Celebrity Style · Red Carpet · Get the Look
Tutorials

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

Hit or miss?

What do you think of this look?

Meghann Fahy Outfit Ideas
Up Next

Meghann Fahy Outfit Ideas

Celebrity

Leave a Reply

Save
The Weekly Edit

Every look worth knowing, every Friday.

The best celebrity outfits of the week, the pieces behind them, and where to find them — in one beautifully edited email.

No spam. Unsubscribe anytime. See our Privacy Policy.