Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ErikBernskiold/6095534 to your computer and use it in GitHub Desktop.
Save ErikBernskiold/6095534 to your computer and use it in GitHub Desktop.
Shows the content within the if-clause only on the frontpage.
<?php if ( is_front_page() ) : ?>
<h2>Hooray! This is the front page!</h2>
<p>Yep, we are on the frontpage, within this if-clause, we can do whatever we want. Pretty neat, eh?</p>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment