Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Header configuration & styling »

How to put different header image per category


  #1  
Old Jun 10, 2010, 11:28 AM
unelma
 
18 posts · Oct 2009
Hi,
I have put different header image in every page like this:
(ATO > CCS inserts)
body.page-id-2 div#myimage {
background-image:url('/wp-content/themes/atahualpa/images/header_etusivu2.jpg') !important;
position:relative;
margin:0;
padding:0;
height:287px;
}

And my default image is:
#myimage {
background-image:url('/wp-content/themes/atahualpa/images/header_etusivu2.jpg') !important;
position:relative;
margin:0;
padding:0;
height:287px;
}

I also have to define different image per category.

How I could do it?
Thanks for help

I am using:
Atahualpa 3.4.9
WordPress 2.9.2.
  #2  
Old Jun 10, 2010, 11:45 AM
juggledad's Avatar
juggledad
 
23,647 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
use 'body.category-xxxxxxxx div#myimage' where xxxxxxx is the name of the category. You can find this by viewing the page, look at the source and fine the <body... statement
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Mar 18, 2011, 05:41 PM
crashley1784
 
81 posts · May 2009
Will this solution work for all posts in a given category? So, for example, I have 3 posts in Category x. When someone is looking at post 1 in Cat x, will the Cat x header be displayed?
  #4  
Old Mar 18, 2011, 06:13 PM
juggledad's Avatar
juggledad
 
23,647 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Should be as long as the post is not in multiple categories. In that case I think wordpress gives the first
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Mar 18, 2011, 07:07 PM
crashley1784
 
81 posts · May 2009
Sad face...
I got the header images to change per category page, but when a user clicks on a particular post in that category, the header image reverts to the default image. You can see what I mean here: http://www.laurenacooper.com/thoroughfare
When you click on "Alumni Esplanade" in the category menu, the image is shown correctly. But when you click on the actual post to view it, the default header is shown. The same is true for all the other categories. Is there any way to work around this aside from manually assigning the header image by css for each individual post??
Geez I hope so because this is EXACTLY what I needed for this site, and I hope to God that I don't have to write css for every single post....
  #6  
Old Mar 18, 2011, 07:54 PM
juggledad's Avatar
juggledad
 
23,647 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
the CSS to set the image based on the category is using the CLASS that WordPress assigns to the <body... > statement like
HTML Code:
<body class="archive category category-alumniesplanade">
When you click on a post, the CLASS changes to
HTML Code:
<body class="single single-post postid-163">
so any CSS Selector that depends on the <body...> having a category class will not apply.

So unless you find a plugin that will add the category to the body statement, or edit the WordPress code, if you want a particular image based off the BODY class, it looks like you will have to have css for each postid-xxx

sorry
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #7  
Old Jan 31, 2012, 02:14 AM
keldan
 
1 posts · Jan 2012
new to wordpress and atahualpa enthusiast, yet stuck... I'm trying to use different header images both in pages and categories, put the above code in CSS Insert (obviously changing images names) but the header is still the same, i.e. the only image I left in ./header folder. Did I miss/mess something? I'm using 3.7.3

thanks
  #8  
Old Jan 31, 2012, 04:08 AM
juggledad's Avatar
juggledad
 
23,647 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
what is the url?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #9  
Old Apr 8, 2012, 12:45 PM
rickheck
 
139 posts · Oct 2009
There is a way to use a specific header image for a specific page/post. Take a look at how I did it here http://forum.bytesforall.com/showthread.php?t=17243 .

It does require modifying one of the theme files, but it works quite well. Plus gives you the ability to suppress parts of a page/post (like the byline), and the use of the 'STB custom query' features of that template (it is based on that template).

....Rick...
  #10  
Old Jul 15, 2012, 07:37 PM
havocart's Avatar
havocart
 
2 posts · Jul 2012
Columbia, South Carolina
Quote:
Originally Posted by rickheck
There is a way to use a specific header image for a specific page/post. Take a look at how I did it here http://forum.bytesforall.com/showthread.php?t=17243 .

It does require modifying one of the theme files, but it works quite well. Plus gives you the ability to suppress parts of a page/post (like the byline), and the use of the 'STB custom query' features of that template (it is based on that template).

....Rick...
--- I would love to know how to "use a specific header image for a specific page/post" but the above link that you have posted does not work for me... any advice? I am more than willing to dive into the code, although somehow with this theme, I actually haven't needed to until now! It's pretty great.

Thanks.
  #11  
Old Jul 16, 2012, 04:09 AM
juggledad's Avatar
juggledad
 
23,647 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
that link goes to the gold forums. The Gold Forums are avaliable to members who have doated $20 or more in support of the theme author and/or moderators
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Jul 16, 2012 at 07:41 AM.
  #12  
Old Jul 17, 2012, 11:01 AM
havocart's Avatar
havocart
 
2 posts · Jul 2012
Columbia, South Carolina
I thought so, however, I have already gladly donated that much when I first used this template 06/23/12 via the link provided in the options panel of the template. I did sign up for this forum at a later time though...

Any chance of getting hints to what that gold-plated link says?
  #13  
Old Jul 17, 2012, 12:41 PM
juggledad's Avatar
juggledad
 
23,647 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Send me a pm wite the PayPal transaction and your PayPal ID
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot get to the file directory to put in my header image ncristine Header configuration & styling 5 Apr 21, 2012 10:33 AM
HOWTO: put your image in the header juggledad Header 71 Jan 12, 2011 01:42 PM
Put a background color behind header image (newbie) Quasar2010 Header configuration & styling 5 May 25, 2010 05:57 AM
Put search bar in header image area? genevieve Header configuration & styling 0 Jun 19, 2009 06:19 PM
How to put the page menu bar under the header image? manu Page & Category Menu Bars 1 Mar 9, 2009 08:39 AM


All times are GMT -6. The time now is 11:50 AM.


Powered by vBulletin® Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.