I have a wordpress site. I have a div that I only want to appear on the homepage (in the header). What type of php if statement do i need…

In other words:

only show …. in the header of the main blog index page. Problem is the header itself is loaded in every page.

Thanks!

4 Answers
4

See: http://codex.wordpress.org/Function_Reference/is_home

<?php if(is_home()): ?>

<div>Your div.</div>

<?php endif; ?>

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *