|
#1

Jun 10, 2010, 11:28 AM
|
|
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

Jun 10, 2010, 11:45 AM
|
 |
|
|
23,765 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

Mar 18, 2011, 05:41 PM
|
|
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

Mar 18, 2011, 06:13 PM
|
 |
|
|
23,765 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

Mar 18, 2011, 07:07 PM
|
|
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

Mar 18, 2011, 07:54 PM
|
 |
|
|
23,765 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

Jan 31, 2012, 02:14 AM
|
|
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

Jan 31, 2012, 04:08 AM
|
 |
|
|
23,765 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

Apr 8, 2012, 12:45 PM
|
|
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

Jul 15, 2012, 07:37 PM
|
 |
|
|
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

Jul 16, 2012, 04:09 AM
|
 |
|
|
23,765 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

Jul 17, 2012, 11:01 AM
|
 |
|
|
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

Jul 17, 2012, 12:41 PM
|
 |
|
|
23,765 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
|
|