use new header template for one page
I would like to make a new header template for just one page, removing the image code
I have a static page using a template and that template loads a different header template. I would like to change the new header template to remove everything to do with the image and it's rotation. I want to style several things in the header area. I removed <?php bfa_header_config($bfa_ata['configure_header']); ?> from the template, but of course that removed the menu as well. Everything else is fine. What code do I need in the new header template, to get the menu reloaded? I would like to keep the header size etc normal for other pages. I suspect it's not as simple as that !! |
I have tried copying all, and parts, of the bfa_header_config.php file into my new header template- and removing the call <?php bfa_header_config($bfa_ata.... etc
but my lack of knowledge of PHP is preventing me seeing what stops it from working. On my last try, the error message pointed to the last line of the header which is "<!-- Main Column --> <td id="middle">" I think that means up to there was OK -I'm guessing that some code before that has not been finalised? Or is there another file I need to copy into the header as well? I would like to have the menu and the category menus displayed but leave out the rotating header on just one page - otherwise I could just eliminate the header image entirely by removing %image Hope someone can help me here PLEASE!! |
if you want the rotating images on most pages and a single image on a particular page, just use a CSS insert for the unique page like this
HTML Code:
body.page-id-2 div#imagecontainer { |
Thanks J, I really want to insert a div with several boxes in it -I've tried putting text box widgets there but it's not exactly what i want,I would prefer to have full control of the html/css in that area - replacing the header image with boxes, two for text, and one a slideshow.
|
here is an idea, put all your code to gether and give the outermost <div id="my_imagecontainer">
put this code in the 'configre header area' option right after %image. now add the following CSS (assuming page 2 is the page you don't want the rotating header, but want yours) HTML Code:
body div#my_imagecontainer {display:none;} |
Well I have got what I wanted, sorry JD I only just saw your suggestion- thanks I will have a think about it, perhaps you will comment on this 'Hammer & Chisel' approach -
ATAHUALPA - replace header image with content create a page template by copying index.php and renaming it Front.php Put this code at the top <?php /* Template Name:Front */ ?> replace 'get_header(); ?>' with <?php include (TEMPLATEPATH . '/header_front.php'); ?> OK , next - create a new header.php file called header_front.php from header.php look down the code and after <?php bfa_header_config($bfa_ata['configure_header']); ?> insert link to content file, which can be a php call or just a link to an html file - ie <?php include (ABSPATH.'wp-content/themes/atahualpa/newhead.htm'); ?> or <div class="slideright"> <?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?> </div> change home page to use 'Front' template and create an html file with whatever code and content you need. Put CSS in the Atahualpa Insert CSS section. I have it up and running, but very experimental and way too dirty to show you!! (but I think you know the url) tested working IE7 and FF Is this a dirty way to do it? When I upgrade the theme, will my files Front.php, header_front.php & newhead.htm stay or have to be re uploaded? |
yes you will have to migrate those files
p,s, I just did a quick test of my suggestion and it works like a charm |
Quote:
The CSS insert method looks like an easier way of doing this, but I'll have way too many pages to add a new insert for each page created. |
I'm going to try JD's method today, but in case it helps, here's my entire .htm file.
It doesn't seem to matter whether there is head in it but I've left it just in case it breaks in some browser. This gives me 3 inline boxes in the header area, with the right CSS <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> </head> <body> <div class="headboxcontainer"> <div class="headbox"> <div class="box1"> BOX ONE</div> <div class="slide"> <?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?> </div> <div class="box2">BOX TWO</div> </div> </div> </body> </html> The outer 'headboxcontainer' is there to push the sidebars and content down to the right position. It's rough and ready, I'm still testing. |
Juggledad- you are a genius!!
Your method is way simpler!! Is there a shortcut if I want to do that on more than one page? |
you could do this
HTML Code:
body div#my_imagecontainer {display:none;} |
All times are GMT -6. The time now is 08:37 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.