[SOLVED] How to assign different header-images to different pages?
Hi there
I'm looking for a way to assign one specific header-image per page, eg - header1 on page X - header2 on page Y - header3 on page Z Seems quite hard to achieve (see this older post: http://forum.bytesforall.com/showthr...ht=diff+header but maybe there is a way of doing this now? Would be great! All the best Roman |
at ATO->Style & edit HEADER AREA->Configure Header Area use
HTML Code:
<div id="imagecontainer" class="header-image-container"></div> at Add HTML/CSS Inserts->CSS Inserts add HTML Code:
div#imagecontainer { HTML Code:
body.page-id-211 div#imagecontainer { |
Hi Juggledad
Thanks very much, works perfectly well :-) One final question remains: I've set a static page as homepage (with page id 88). In such a case, I'm not able to set the header-image for the homepage. The code HTML Code:
body.page-id-88 div#imagecontainer { I'm using the plugin "widget logic" as well, where I can set a widget to appear on certain pages. If I set a static page as homepage, the settings there also won't work anymore (either "is_home()" or "is_page('10')") - so i think it has to be quite the same "phenomenon"? Thanks very much for you help All the best Roman |
Might not the Dynamic Headers plugin work as well along with giving you control of which page gets what image without digging into the code each time you want to make a change? I have not tried it with ATA but it worked quite well on a test site I built.
|
lmilesw - good suggestion, I hope someome tries it and reports
gxxfy: try changing the selector to: HTML Code:
body.home div#imagecontainer, |
I tried the Dynamic Header suggested by Imilesw on my Atahualpa site - the good news is that you can get the selected image to appear at the top of the target page - but the BAD news is that the Atahualpa header.php keeps rendering the standard rotation of images in the area immediately below!
Ideally it would be good if the Atahualpa header could be suppressed, leaving all headers to be managed by the Dynamic Header plug-in. Even better if this could be done without edits to the header.php (or any other file). Ideas, anyone? |
I did a search of these forums and found a quite simple solution.
Instead of messing with the php files you can insert Dynamic Headers by simply pasting the following in the Configure Header Area box HTML Code:
<div id="dheader"><?php if(function_exists('show_media_header')){ show_media_header(); } ?></div> Style & edit HEADER AREA > Configure Header Area and paste HTML Code:
<div id="dheader"><?php if(function_exists('show_media_header')){ show_media_header(); } ?></div> %logo %pages %bar1 <div id="dheader"><?php if(function_exists('show_media_header')){ show_media_header(); } ?></div> %bar2 The id is so you can style the container for the Dynamic Header image. The minimum CSS I would suggest adding to ATO>Add HTML/CSS Inserts>CSS Inserts would be the following. HTML Code:
#dheader { |
Hi there. Just set up a new blog (www.abenteuer.ch). Dynamic Header Plugin does not work without the modification mentioned above (replacing "%image" with "<?php show_media_header(); ?>"): I've set a different header image for page 2 http://www.abenteuer.ch/?page_id=2, but it just won't appear with %image still in place.
But also with this solution two problems remain: - the transparencies in the header image (sidebars) are gone, I think there won't be a way to get them back as the standard header-function is being "overwritten" by the modification?! Of course I could get them back in photoshop. - does not work on the homepage, because the homepage is set as "show latest posts". I can assign a header Image to the (single) post on the homepage with the plugin, but also in this case there won't be a header image. So i think I have to either set the homepage as static page (and not as showing the latest posts) and go on with the missing transparencies, or with juggledad's suggestions (thanks again). juggledad: I did not try your latest suggestion (changing the selector) yet. But with the first one I got a problem with the transparencies as well: the lower maybe 5 pixels of the transparency where missing (just above the sidebar). I'll post the link with the modifications by tomorrow. Thanks and cheers Goofy |
Thanks for all your suggestions, finally did it with Dynamic Headers and manually added transparencies (still got the error in the transparency with the css-mods). All the best, Goofy
|
HOWTO: Set different header images clickable (linked) to a different location (http://forum.bytesforall.com/showthread.php?t=6538)
|
All times are GMT -6. The time now is 09:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.