Community Forums › Forums › Archived Forums › General Discussion › Different Headers on Different Post Types and Categories
- This topic has 15 replies, 4 voices, and was last updated 11 years, 9 months ago by
Brad Dalton.
-
AuthorPosts
-
May 25, 2013 at 6:07 am #42588
vajrasar
MemberOn our News site we have sections like Crime, Politics etc. [ categories ] plus we also provides services like Classifieds [ custom post type ].
What would be the way to display different header images when user is on Posts of Crime or Classifieds?
Thanks for the help.
I make WordPress websites using Genesis Framework.
May 25, 2013 at 11:44 am #42610Susan
ModeratorHave you looked at this plugin?
May 26, 2013 at 4:39 am #42667vajrasar
MemberThank you. I will use it and if it's the one, I will mark the topic resolved. 🙂
I make WordPress websites using Genesis Framework.
May 27, 2013 at 2:03 am #42774vajrasar
MemberSusan, the plugin is awesome but to make it work, there is a code that should be pasted in header.php
So, I was wondering if  you know how one can achieve that with genesis?
I make WordPress websites using Genesis Framework.
May 27, 2013 at 5:58 am #42778Susan
ModeratorDashboard > Genesis > Theme Settings > scroll all the way down to until you see "Header and Footer Scripts" Â > enter the code there.
May 27, 2013 at 7:03 am #42783AnitaC
KeymasterYou can do this by using your Categories. Go to one of your Categories in Edit Mode. Scroll down and look for this area:
https://www.dropbox.com/s/1k3xts4t1kqcyxh/Edit%20Category.png
You can add in text and HTML in the Description. I set this up recently for someone who wants to add a new image to a category each month. The easiest way was to go this route. You can see it here. The image shows up at the top and the corresponding blogs show up beneath it.
Need help with customization or troubleshooting? Reach out to me.
May 27, 2013 at 7:08 am #42784vajrasar
Memberanitac, that is one way to do the stuff and I used that too in previous assignment. But this time, I need to change 'header image' on each category or custom post type. Much like what huffington post [ http://www.huffingtonpost.com ] do.
Am trying to use what Susan suggested and will revert back as soon as I get what I seek to achieve. In the meantime, please let me know if you have any else way in your mind.
Thank you for the reply.
I make WordPress websites using Genesis Framework.
May 27, 2013 at 7:27 am #42786AnitaC
KeymasterOk, so I can understand what you want - are you wanting to put a Random Image up on the post types/categories - or are you wanting to put the most recent story's Featured Image. How do you want to add the image to those area?
I am still thinking you want 1 header per category or post type - you can insert the Header in the description area.
As I look at Huffington Post - they have more than one story spread out across the page with one Lead In Featured Story utilizing the header across the top.
So I am still not getting what you want that won't be accomplished with using the areas in the Category section.
Need help with customization or troubleshooting? Reach out to me.
May 27, 2013 at 8:09 am #42789vajrasar
MemberAs you can see the header on huffington post's frontpage says "Huffington Post" but when you will go in categories like Politics, then you'll see "Huff Post Politics" in the header [ on the top ] .
We do not want need to do with the Featured Image, just the header image should be set different for every different category and custom post type.
I make WordPress websites using Genesis Framework.
May 27, 2013 at 8:20 am #42792AnitaC
KeymasterI must be missing something because you can insert the image you want into each specific category description area using the method I gave you. You just use the:
<img src="http://www.yourdomain.com/images/yourimage.jpg">
Just insert your image. What am I missing?
Need help with customization or troubleshooting? Reach out to me.
May 27, 2013 at 8:36 am #42794vajrasar
Memberanitac, I did what you suggested. Please see this screenshot -Â http://i.imgur.com/tkd27ox.png?1
I make WordPress websites using Genesis Framework.
May 27, 2013 at 9:21 am #42801AnitaC
KeymasterNow I get it!! I saw someone post something like this somewhere. Let me check where I saw it and I'll post back here.
Need help with customization or troubleshooting? Reach out to me.
May 27, 2013 at 9:24 am #42802AnitaC
KeymasterBrad Dalton did this one. It does state you can do it for Categories - http://wpsites.net/wordpress-tips/featured-images-how-to-display-unique-header-images-on-different-posts-pages/.
Need help with customization or troubleshooting? Reach out to me.
May 27, 2013 at 10:34 pm #42869Brad Dalton
ParticipantMay 28, 2013 at 3:58 am #42886vajrasar
MemberHi brad,
If am right, the flow in which your suggested code works is -
1) It checks if am in category archive page
2) if yes and if it is category=1 (I chose cat 1 to test this)
3) it places my desired image in 'genesis header' hook (and the default header is pushed below which I can hide via CSS as you pointed)
Neat. But what I was trying to figure out is that, isn't there anyway by which the header can be literally replaced on our wish, by using some kind of filter or coding something?
Using Genesis from past a year I have seen that nearly all things are possible, so I was wondering if there could be a way!
If not, then your suggested method is perfect. But please do let me know if it is the only method.
Thanks a ton.
I make WordPress websites using Genesis Framework.
May 28, 2013 at 5:43 am #42895Brad Dalton
ParticipantI'd add an else to the end of this code so all other pages display a default header rather than hide it using CSS.
Or use this plugin http://wordpress.org/plugins/wp-display-header/
Another option is to use CSS and the page i.d or body class.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.