Support » Plugin: WordPress Infinite Scroll - Ajax Load More » Issue with displaying text just for the front or homepage

  • Resolved databell96


    Have a repeater template set up and in it I have a call to display something if the user is on the homepage. So my code for this area is as follows:

    <header class="entry-header">
        	<?php if ( is_front_page() && is_home() ) { ?>
            <h4 class="type-title <?php echo get_post_type( $post ) ?>"><?php $post_type = get_post_type_object( get_post_type($post) );
    echo $post_type->label; ?></h4>
            <?php } ?>
    		<h1 class="entry-title"><?php the_title( ); ?></h1>
    	</header><!-- .entry-header -->

    Problem is it is ignoring my is_front_page is_home call. So the H4 never appears. Is it because I have a && in there? Or something else? Would love to make this work.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author dcooney


    is_front_page() & is_home() are the same thing though right?
    What if you remove one of those conditionals?

    I changed that to just

    <?php if ( is_home() ) { ?>

    And I still don’t see my h4 class.

    Plugin Author dcooney


    Ive had trouble with those functions in the past.

    Can you try <?php if ( is_page(‘home’) ) { ?>

    Plugin Author dcooney


    Assuming Home is your frontpage… unless you don’t have a page for your Home.

    That didn’t work either.

    Doesn’t matter anymore. Client decided that they didn’t want the area I wanted to show up on the homepage to be on the homepage anymore. Thanks for all the assistance though.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Issue with displaying text just for the front or homepage’ is closed to new replies.