WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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:



share|improve this answer
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. – Terrell Anderson Aug 2 '12 at 23:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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