Title: Custom Headers
Last modified: March 23, 2017

---

# Custom Headers

 *  [Squidpeg9](https://wordpress.org/support/users/squidpeg9/)
 * (@squidpeg9)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/custom-headers-8/)
 * _[ Moderator note: [moved to Fixing WordPress](https://wordpress.org/support/topic/wheres-my-topic-gone?replies=1&view=all).
   Please do not use Developing with WordPress for these topics. ]_
 * Hi, I have a client who wants to have a custom CSS stylesheet load for certain
   pages ONLY. I know how to create a custom page template, but I need three of 
   these, and each one needs to reference a different CSS and load different code(
   have different head info.) What would be the best way to go about doing that?

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/custom-headers-8/#post-8946519)
 * You could selectively load stylesheets using wp_enqueue_style() within conditional
   structures based on the value returned by get_queried_object_id(). Code that 
   basically says “if the queried page ID is X, then enqueue stylesheet foobar.css”
   Or whatever.
 * You could also manage everything with a single stylesheet and by using appropriate
   selectors and style placement. With most themes, there is always a unique body
   class on every page, something like page-id-xxx. Including this class as part
   of the CSS selectors will ensure the associated styles are only applied to that
   one page whose ID matches the number replacing xxx.
 * All other things being equal, the last listed style is applied in preference 
   to any conflicting styles that occurred earlier. Thus ensure your page specific
   styles are applied after the generic styles for other pages.

Viewing 1 replies (of 1 total)

The topic ‘Custom Headers’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/custom-headers-8/#post-8946519)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
