WordPress Display on Homepage Only: Show Only on Home Page

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 )  ) : ?>
<?php endif;?>

Leave a Reply

You must be logged in to post a comment.