Issue with displaying text just for the front or homepage
-
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)
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.