• I am using get_template_part(‘content’); in single.php. The the_post_thumbnail(‘large-thumbnail’); function shows the thumbnail image perfectly before. But it does not show with is_single() function in content.php.

    <?php
    if(is_single()){
    the_post_thumbnail('large-thumbnail');
    the_content();
    }else{
    the_post_thumbnail('small-thumbnail');
    echo get_the_excerpt();
    ?>
    <a>">Read more&raquo;</a>
    <?php } ?>

    single.php:

    <article>
            <div class="single_post_content">
                <h5><?php the_title(); ?></h5>
    
                <?php
                get_template_part('content');
                ?>
            </div>
        </article>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘is_single() dose not show thumbnails’ is closed to new replies.