How to change header in Wordpress Blog page and all Post pages only. I want a custom header in Blog page and all single posts page.
Thanks
You can use conditional tags within Wordpress:
http://codex.wordpress.org/Conditional_Tags
Basically, you will need to create the content you want only for the blog and post pages and wrap this within the conditional tags:
P.S Don't forget to include the category, and archive pages - as well as the post pages.
is_single(), is_archive(), is_category()
<?php if (is_single()) { ?>
// This is a post page
<?php } else { ?>
//This is not a post page
<?php } ?>
Hope this helps.
To include different header for specific pages change get_header($name)
function call inside templates and add $name
attribute. Wordpress will load header-{name}.php
if file exists, if not, default header header.php
will be loaded. Check out template hierarchy for templates where you need to change get_header() function call ( single.php, page.php ).
Wordpress documentation: