WordPress Display on Homepage Only: Show Only on Home Page

wordpress-show-on-homepage-only

How to display Something only on the homepage/front page/home in WordPress
If you want to some content (links, advertisement, specific element ) only display on homepage/frontpage/home in WordPress, you need to use some php code to control this.

Use the following php code to insert your WordPress homepage. Please make sure which page you use as homepage, the default is index.php and home.php

<?php if( is_front_page() && ( $paged < 2 )  ) : ?>
YOUR CONTENT HERE
<?php endif;?>
 

Leave a Reply