Display Code only on WordPress Frontpage Not any other Pagination page

I was looking for a simple code to display only on WordPress Frontpage Only Not any other Pagination page. Like only the home page of WordPress, not Page 2,3,4 ect.. and it seems that no one new exactly what I wanted. Just display it on the main index of the page, all the codes I found shows what I wanted to display on all pages until I found this simple code.

<?php if( is_front_page() && ( $paged < 2 )  ) : ?>	
Add Content you want to diplay here	
<?php endif;?>

And in my case I wanted to show the latest topics on the front page. So all I did was add this code on the index.php file of my theme where I wanted it to be shown.

<?php if( is_front_page() && ( $paged < 2 )  ) : ?>	
<h1>Support Topics</h1>			
topics go here		
<?php endif;?>

This code is so simple yet people on a site like stackexchange didn’t know how to do it 🙂

Leave a Reply

You must Register or Login to comment on Display Code only on WordPress Frontpage Not any other Pagination page