Home | Articles | Wordpress | Only Show Featured Image on the First Page of a Post

Only Show Featured Image on the First Page of a Post

The nice thing about running sites on WordPress is that you will never run out of things to try. It seems like there is always something new that can be done to better the experience of the reader or further enhance the site. Featured Images are a great way to show off your post, but what if you don’t want the featured image displayed on every page of your paginated post/page? Well, welcome to the solution center! There is an easy way to accomplish this.

In your theme, you may have a page.php or a single.php file depending on how your theme is set up.  If you don’t have a page.php, you need to edit your single.php file.

look for something like:

     <?php the_post_thumbnail(); >

and change it to:

   $paged = get_query_var( 'page' ) ? get_query_var( 'page' ) : false;
   if ( $paged === false ): ?>
     <?php the_post_thumbnail(); ?>
<?php endif; >

Note: This one is my own creation.

About Joe D

I have always had a passion for everything computing. In early 2000, I decided to take my passion to the web. Thus, C.O.D. was born. Through the years we have made many great friends at C.O.D. and hope to continue our journey for years to come.

Check Also

Manage Multiple WordPress Sites with InfiniteWP

Running your website, or websites, on WordPress is an easy choice as the flexibility the …

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.