Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have an if statement already in my loop to display content based on post type. I was wondering if there was a way that I could say to ignore that section if it is the front page/homepage. Here's a sample of my code:

    <?php if( get_post_type() == 'reviews' ) { ?>

<div class="post-review">

                <div class="review-score">

            other div stuff


<?php } ?>
share|improve this question

1 Answer 1

up vote 0 down vote accepted

Check for is_front_page() and if you want to catch the first page only inspect get_query_var( 'paged' ) too:

if ( is_front_page() and 2 > get_query_var( 'paged' ) )
    // we are on the first page of the front page
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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