different header images for each page

112 views
Skip to first unread message

lucy Jackson

unread,
May 29, 2012, 5:40:46 PM5/29/12
to Manchester WordPress User Group
Hi All,
I just wondered if you knew whether i can change the header images for
different pages and categories? Im using the twenty eleven theme.
Thanks!
Lucy

Chris Witham

unread,
May 29, 2012, 5:53:31 PM5/29/12
to manchester-word...@googlegroups.com
Hi Lucy,

You'd need to set these in your style.css file I think. Something like:

.category-catname1 #header {
background: #fff url(images/catname1bg.jpg) top left no-repeat;
}
.category-catname2 #header {
background: #fff url(images/catname2bg.jpg) top left no-repeat;
}

If you inspect or view source on the website you'll see the category classes added to the body element.

Hope that helps.

Chris



Lucy

--
See the group blog at http://mwug.info

You received this message because you are subscribed to the Google
Groups "Manchester WordPress User Group" group.
To post to this group, send email to
manchester-word...@googlegroups.com
To unsubscribe from this group, send email to
manchester-wordpress-...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/manchester-wordpress-user-group

Angel Utset

unread,
May 30, 2012, 2:57:11 AM5/30/12
to manchester-word...@googlegroups.com

Hi

 

I would like to add that you can introduce conditional statements. For instance, I have Multilanguage sites. Header images and text change according to the values of the ICL_LANGUAGE_CODE variable.

I am using pagelines theme, but you can find similar solutions in any other theme.

 

Cheers

 


Mike Little

unread,
May 30, 2012, 8:21:17 AM5/30/12
to manchester-word...@googlegroups.com
Lucy,

If you add a large enough image (1000 pixels wide or more) as the featured image to a post or page, Twenty Eleven will automatically use that image as the header for just that page.


Chris' suggestion should work for categories.

Mike
--
Mike Little
http://zed1.com/

Reply all
Reply to author
Forward
0 new messages