Skip to content
Create a gist now

Instantly share code, notes, and snippets.

How to define a default post thumbnail....
function default_thumbnail($html) {
global $_wp_additional_image_sizes;
$isize = $_wp_additional_image_sizes;
$w = $isize['post-thumbnail']['width'];
$h = $isize['post-thumbnail']['height'];
if (empty($html)) {
$html = '<figure class="default-post-thumbnail">';
$html .= '<img src="'.$w.'x'.$h.'" alt="" />';
$html .='</figure>';
return $html;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.