have element display ONLY on first page of posts
-
Hi all,
I have a standard blog, and am trying to create ad space that will display ONLY on the first page of posts. Once a user goes to the previous page (/page/2) that ad space will no longer appear.
I figured I could do a conditional, but for some reason it’s not working correctly for me.
I’ve tried something like this, to test:
`<?php if (is_front_page()){ ?>
<p>Home Page</p>
<?php else { ?>
<p>Not Home Page</p>
<?php } ?>
?>’I’ve also tried is_home() instead of is_front_page… neither work. My outcome is that “Home Page” displays on not just the homepage, but also all the previous pages of blog posts.
Any suggestions? Thanks
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘have element display ONLY on first page of posts’ is closed to new replies.