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 Answer 1

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

1
  • 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
    Commented Jun 20, 2012 at 7:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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