Hi i'm asking this question here because i don't know exactly how to put this into words on google lol.

But I have a blog and i am using custom post type and each post type will have a different stylesheet. The Post types will all have the same way of displaying content but the homepage will be different. I realize that importing the header may be a problem. her are the examples.

enter image description here

enter image description here

Notice the first photo is the index, the home page, the second photo is a custom post type page. On the home page there is no banner at the top but on the custom post type page it is. Is there an easier way for me to implement the header and different css styles so that i won't have to go in and rearrange all custom post type pages if i decide to make a change to the header of the site.

Right now All i know is, taking the header and the index.php file putting them together in the custom post type template and creating it's own css template as well.

Is there an easier way for me to have the "php get header" function and add the banner without having to go in each post type template to edit the header.

1 Answer 1


Just use the css classes that were generated by WordPress!?

<body <?php body_class(); ?>

This makes it pretty easy to add special styles for all of your custom post types or archive pages.

If you really want to use different css files for each post type / archive page use the conditional tag is_singular() in your to load the stylesheets.

Here are some links:



  • Hi thank you, I'm reading up on this but i do not understand what to add to the code for different stylesheets and where to put it. Aug 2, 2012 at 23:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.