Featured Image on First Page of a Post Only

January 2013 WordPress Theme
GK User
Wed Jun 19, 2013 3:39 am
Many of my posts require the use of multiple pages. How do I set it so the featured image is set to only the first page of a post?

For instance, I want to publish an article where I interviewed multiple people. Each page will have a picture and their quotes underneath. It looks weird w/ the featured image appearing on each page.

Thank you so much for all that you guys do. I really appreciate it. I searched the internet for a few hours and couldn't come across an answer that explained it.
User avatar
Senior Boarder

GK User
Wed Jun 19, 2013 8:28 am
This would require to do some changes in theme files.
edit:
wp-content/themes/News/layouts/content.post.featured.php
and change:
Code: Select all
<?php if(is_single() && $params_image == 'Y') : ?>

by modifing line and adding before it:
Code: Select all
<?php $pagedtest = get_query_var( 'page' ) ? get_query_var( 'page' ) : false;?>
<?php if(is_single() && $params_image == 'Y' && $pagedtest === false) : ?>


This should keep featured image only on first page of paged article.
User avatar
Moderator


cron