• Hi,

    I have
    add_image_size ( ‘Small Thumbnail’, 60, 60, false );

    and I want to call it using the following:

    if ( $the_query->have_posts() ) {
                echo '<ul class="recipes-list">';
                while ( $the_query->have_posts() ) {
                    $the_query->the_post();
                    echo '<li class="clearfix">';
                    $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
    
                    if($url == "")
                    {
                        $url = site_url().'/wp-content/uploads/2015/09/noimage.png';
                    }
    
                    echo '<a href="'.get_permalink($post->ID).'"><img src="'.$url.'" height="60" width="60"/></a>';
                    echo '<article>';
                    echo '<h3><a href="'.get_permalink($post->ID).'">'.get_the_title().'</a></h3>';
                    ?>

    I would really appreciate any help.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Add specific thumbnail size to theme file’ is closed to new replies.