Created
November 27, 2012 10:28
-
-
Save wokamoto/4153514 to your computer and use it in GitHub Desktop.
Revisions
-
wokamoto created this gist
Nov 27, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ <?php function thumbnail_noimage($html, $post_id, $post_thumbnail_id, $size, $attr) { if (!empty($html)) return $html; $post_thumbnail_id = 1234; // default thumbnail image id $html = wp_get_attachment_image( $post_thumbnail_id, $size, false, $attr ); return $html; } add_filter('post_thumbnail_html', 'thumbnail_noimage', 10, 5);