Title: Page-specific CSS elements
Last modified: August 20, 2016

---

# Page-specific CSS elements

 *  [SK](https://wordpress.org/support/users/sooskriszta/)
 * (@sooskriszta)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/page-specific-css-elements/)
 * I am using a standard WP theme (Weaver). It is a customizable theme which I have
   customized from the Theme Admin.
 * So far I love the theme.
 * There is one page, though, where I want a particular element to be styled differently
   compared to other pages. How can I specify page-specific CSS?

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [Pioneer Web Design](https://wordpress.org/support/users/swansonphotos/)
 * (@swansonphotos)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/page-specific-css-elements/#post-2476229)
 * Weaver has many page templates, when creating a page, select a different page
   template or you can create your own and use that.
 *  Thread Starter [SK](https://wordpress.org/support/users/sooskriszta/)
 * (@sooskriszta)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/page-specific-css-elements/#post-2476230)
 * I don’t really want to change the template…just to change the CSS for one lousy
   little element. Is there an easy way of doing that?
 *  [Pioneer Web Design](https://wordpress.org/support/users/swansonphotos/)
 * (@swansonphotos)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/page-specific-css-elements/#post-2476234)
 * Site link and exactly what do you wnat to change?
 *  Thread Starter [SK](https://wordpress.org/support/users/sooskriszta/)
 * (@sooskriszta)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/page-specific-css-elements/#post-2476293)
 * The site is not launched/public yet, so unable to share link here yet.
 * I have a custom menu on top of page, and on one page I want to change the background
   of one of the menu items.
 *  [Shailesh](https://wordpress.org/support/users/shaileshsavaliya/)
 * (@shaileshsavaliya)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/page-specific-css-elements/#post-2476296)
 * I think you have to use condition for this……..
 *     ```
       //Get id of current page
       <?php
       $var = get_the_ID();
       if($var == "Your page id")
       {
       ?>
           your style here......
       <?php
       }
       ?>
       ```
   
 *  Thread Starter [SK](https://wordpress.org/support/users/sooskriszta/)
 * (@sooskriszta)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/page-specific-css-elements/#post-2476297)
 * Where would I need to put this code?
 *  [Shailesh](https://wordpress.org/support/users/shaileshsavaliya/)
 * (@shaileshsavaliya)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/page-specific-css-elements/#post-2476298)
 * You have to put this code in your template file.
 *  Thread Starter [SK](https://wordpress.org/support/users/sooskriszta/)
 * (@sooskriszta)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/page-specific-css-elements/#post-2476408)
 * Site is [http://www.csillamvilag.com](http://www.csillamvilag.com)
 * All I needed to do was create a custom variable page-head-code and on the pages
   that I wanted things differently, put the CSS as values of this variable.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Page-specific CSS elements’ is closed to new replies.

## Tags

 * [appearance](https://wordpress.org/support/topic-tag/appearance/)
 * [css](https://wordpress.org/support/topic-tag/css/)
 * [page](https://wordpress.org/support/topic-tag/page/)
 * [Themes](https://wordpress.org/support/topic-tag/themes/)
 * [weaver](https://wordpress.org/support/topic-tag/weaver/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 3 participants
 * Last reply from: [SK](https://wordpress.org/support/users/sooskriszta/)
 * Last activity: [14 years, 5 months ago](https://wordpress.org/support/topic/page-specific-css-elements/#post-2476408)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
