1

My home page feed has a variety of items including a featured post and other features that I'd only like present on the home feed. When a user clicks on pagination to load older posts, I'd like to load up a new page template without all the home page bells and whistles. Is there a WP template file I'm overlooking or is this not supported?

1

Consider using the is_home() conditional tag to check whether or not the home page is being displayed or not.

<?php
if ( is_home() ) {
    // This is a homepage
    // Do your fancy loop here with extra bells and whistles
} else {
    // This is not a homepage (i.e. paginated page)
    // Do a stripped down version of your loop above with no bells and whistles
}
?>

Reference to is_home on the WordPress Codex

  • Awesome. Combo'd this with the is_paged function and worked perfectly. If on the home page and NOT paged (!is_paged()) then load up all home page elements. – cqde Jun 20 '12 at 7:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.