Title: Different headers for different categories/post
Last modified: August 31, 2016

---

# Different headers for different categories/post

 *  [rinoadiary](https://wordpress.org/support/users/rinoadiary/)
 * (@rinoadiary)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/different-headers-for-different-categoriespost/)
 * Hi & thank you for this amazing theme.
    Is there a way to set a different header
   image for different categories/posts? (I tried using a 3rd part plugin, it works
   fine with default theme, sadly not with pinnacle)

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

 *  [Ben Ritner – Kadence WP](https://wordpress.org/support/users/britner/)
 * (@britner)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/different-headers-for-different-categoriespost/#post-7254577)
 * Hey,
    Pinnacle doesn’t use a banner like a default theme, It’s done differently
   with the header being over the page title area. There isn’t a built in option
   to change by post or category in the free theme (premium has this).
 * You can use css based on the post ids and classes in the body but that would 
   mean you would have to add custom css for each post an category.
 * Kadence Themes
 *  Thread Starter [rinoadiary](https://wordpress.org/support/users/rinoadiary/)
 * (@rinoadiary)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/different-headers-for-different-categoriespost/#post-7254645)
 * Thank you for your quick response,
    could you please show me an example of a 
   custom css for category?
 *  [Ben Ritner – Kadence WP](https://wordpress.org/support/users/britner/)
 * (@britner)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/different-headers-for-different-categoriespost/#post-7254684)
 * It could look like this:
 *     ```
       body.category-adventure .titleclass {
           background-repeat: no-repeat;
           background-position: center center;
           background-size: cover;
           background-image: url(http://themes.kadencethemes.com/pinnacle/wp-content/themes/pinnacle/assets/img/demo_header_01.jpg);
       }
       ```
   
 * Kadence Themes
 *  Thread Starter [rinoadiary](https://wordpress.org/support/users/rinoadiary/)
 * (@rinoadiary)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/different-headers-for-different-categoriespost/#post-7254685)
 * Thank you, it works! 🙂
 * I guess I have to use a similar code for every single post, even if they belong
   to the category for which I’ve set a custom header?
 *  [hannah](https://wordpress.org/support/users/hannahritner/)
 * (@hannahritner)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/different-headers-for-different-categoriespost/#post-7254688)
 * Hey,
    If you want this to take effect on all your posts you can use this css:
 *     ```
       body.single-post .titleclass {
          background-repeat: no-repeat;
           background-position: center center;
           background-size: cover;
           background-image: url(http://themes.kadencethemes.com/pinnacle/wp-content/themes/pinnacle/assets/img/demo_header_01.jpg);
       }
       ```
   
 * Hannah
 *  Thread Starter [rinoadiary](https://wordpress.org/support/users/rinoadiary/)
 * (@rinoadiary)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/different-headers-for-different-categoriespost/#post-7254701)
 * Thank you 🙂
    My goal is to change the header image for every post included in
   a certain category (and not the ones belonging to a different category), is this
   possible?
 *  [hannah](https://wordpress.org/support/users/hannahritner/)
 * (@hannahritner)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/different-headers-for-different-categoriespost/#post-7254713)
 * To my knowledge there isn’t an option for this. At least not without editing 
   the theme files. Sorry!
 * Hannah
 *  [Ben Ritner – Kadence WP](https://wordpress.org/support/users/britner/)
 * (@britner)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/different-headers-for-different-categoriespost/#post-7254714)
 * Correct there is no category class in the body tag to pull from.
 * Kadence Themes
 *  [arbazkazi](https://wordpress.org/support/users/arbazkazi/)
 * (@arbazkazi)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/different-headers-for-different-categoriespost/#post-7254715)
 * @KadenceThemes
 * I have similar problem. Can you check and guide me?
    [https://wordpress.org/support/topic/header-layout-not-working-properly?replies=1](https://wordpress.org/support/topic/header-layout-not-working-properly?replies=1)
 *  [hannah](https://wordpress.org/support/users/hannahritner/)
 * (@hannahritner)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/different-headers-for-different-categoriespost/#post-7254719)
 * arbazkazi,
    This forum is for Pinnacle theme only. I haven’t worked with the 
   theme you’re using so I’m not sure I could provide much insight. Sorry!
 * Hannah
 *  [hugodebe](https://wordpress.org/support/users/hugodebe/)
 * (@hugodebe)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/different-headers-for-different-categoriespost/#post-7254799)
 * I’m not sure this what you were talking about, but maybe it can help.
 * To add a category class to single articles (or categories classes, if there are
   more than one), I use the following. Just add it into your function.php, preferably
   in a child theme.
 *     ```
       //Add a category class to body of single posts
       add_filter('body_class','add_category_to_single');
       function add_category_to_single($classes, $class) {
       	if (is_single() ) {
       		global $post;
       		foreach((get_the_category($post->ID)) as $category) {
       			// add category slug to the $classes array
       			$classes[] = $category->category_nicename;
       		}
       	}
       	// return the $classes array
       	return $classes;
       }
       //End Add a category class to body of single posts
       ```
   
 * Then you can consider implementing different css styles to a single article, 
   depending on its category.

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

The topic ‘Different headers for different categories/post’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/pinnacle/1.8.10/screenshot.png)
 * Pinnacle
 * [Support Threads](https://wordpress.org/support/theme/pinnacle/)
 * [Active Topics](https://wordpress.org/support/theme/pinnacle/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/pinnacle/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/pinnacle/reviews/)

 * 11 replies
 * 5 participants
 * Last reply from: [hugodebe](https://wordpress.org/support/users/hugodebe/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/different-headers-for-different-categoriespost/#post-7254799)
 * Status: not resolved