Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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

use new header template for one page


  #1  
Old Apr 11, 2010, 01:19 AM
Stingraynut
 
24 posts · Apr 2010
Cairns Australia
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 !!
  #2  
Old Apr 12, 2010, 06:35 PM
Stingraynut
 
24 posts · Apr 2010
Cairns Australia
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!!
  #3  
Old Apr 13, 2010, 05:02 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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 {
background-image: url(/wordpress/wp-content/uploads/bg.jpg) !important;
}
you might have to use the full url
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #4  
Old Apr 14, 2010, 05:17 PM
Stingraynut
 
24 posts · Apr 2010
Cairns Australia
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.
  #5  
Old Apr 14, 2010, 07:18 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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;}
body.page-id-2 div#imagecontainer {display:none;}
body.page-id-2 div#my_imagecontainer {display:inline;}
hopefully this will display the rotating image on all but page 2 and that is the only place my_imagecontainer will show up.
__________________
"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; Apr 15, 2010 at 03:32 AM.
  #6  
Old Apr 15, 2010, 02:37 AM
Stingraynut
 
24 posts · Apr 2010
Cairns Australia
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?
  #7  
Old Apr 15, 2010, 03:33 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #8  
Old Apr 15, 2010, 08:06 AM
vtlock
 
2 posts · Apr 2010
Quote:
Originally Posted by Stingraynut
<?php include (ABSPATH.'wp-content/themes/atahualpa/newhead.htm'); ?>
If I were to make a template that calls an html file to change the header image (I'd like to make different pages that look exactly like my main page--just with different header images), what HTML would need to be in the newhead.htm file?

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.
  #9  
Old Apr 15, 2010, 04:39 PM
Stingraynut
 
24 posts · Apr 2010
Cairns Australia
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.
  #10  
Old Apr 15, 2010, 11:13 PM
Stingraynut
 
24 posts · Apr 2010
Cairns Australia
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?
  #11  
Old Apr 16, 2010, 04:46 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
you could do this
HTML Code:
body div#my_imagecontainer {display:none;}

body.page-id-2 div#imagecontainer,
body.page-id-7 div#imagecontainer.
body.page-id-32 div#imagecontainer {
    display:none;
    }

body.page-id-2 div#my_imagecontainer,
body.page-id-7 div#my_imagecontainer,
body.page-id-32 div#my_imagecontainer {
    display:inline;
    }
__________________
"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
[SOLVED] Page Menu Bar on a page template Jelskedei Page & Category Menu Bars 1 Feb 22, 2010 05:35 AM
[SOLVED] How to make custom template with exact format except header and menus Rashell Header configuration & styling 4 Dec 14, 2009 07:57 PM
How do I create a new page template? JakeThePeg Page & Category Menu Bars 10 Sep 7, 2009 10:33 AM
Using Page Template - where to select? Charlotte Excerpts, Read more, Pagination 1 Feb 28, 2009 01:49 PM
New Template Page Axon Atahualpa 3 Wordpress theme 1 Feb 8, 2009 01:34 PM


All times are GMT -6. The time now is 08:55 AM.


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