[SOLVED] Page template with no menu
I've built website but need to have a page template that has the menu missing (but everything else the same) that can be used as a standalone landing page. Obviously if I just delete the get_header command that will mess everything up ... is there any way I can set up something that pulls all the elements in except the actual menu itself?
Please go easy on me - I know dribs and drabs of CSS/PHP (thanks to working with Atahualpa so much!) but am not a natural coder! The site is at www.max-inheritance.co.uk |
you don't need a template, just some CSS like
HTML Code:
body.home #menu1 {display:none;} |
Thanks ... is there no way to create a template though? The issue is that the client wants to be able to set up landing pages himself, so there will be more than one needing the menu-free layout. I saw a response that gave some CSS that used the page ID and that's fine, but I don't want him to have to dive into the ATO CSS Inserts section every time he wants to add a new landing page - it would be far easier if I could have a completely separate template he could choose from the editing page.
(Also the way the page is set up means without the menu displaying there are a few glitches in the background etc - which I would hopefully be able to iron out in a separate template!) |
The problem is that the menu is in the header and index.php calls get_header() which goes thru other code to build the whole header (bfa_header_config.php). Now I suppose you could get the content of the header configuration ($bfa_ata['configure_header']) and parse it removing the %pages, %page-center or %page-right depending on which is used (oh and don't forget the %cats) right befor the call to get_header() that might work.
|
"Parse" ......? You've lost me I'm afraid!
maybe I will just have to set up some blank pages he can add copy to and use their ID to remove the menu in CSS Inserts. The problem I have is that the header image moves up the page when the menu isn't there ... see the home page http://www.max-inheritance.co.uk/ and the one landing page I made at http://www.max-inheritance.co.uk/landing-page/ ..... the logo ends up overlapping the strip along the top. How can I stop that happening please? |
well this got me thinking and I have come up with a hack that works...but will be unsupported and you will have to reinstall it after each upgrade
1 - create your template - make a copy of 'index.php' and call it 'no-menu.php' - edit 'no-menu.php' and change lines 1-3 from HTML Code:
<?php HTML Code:
<?php - change lines 4-16 from HTML Code:
global $bfa_ata, $post; HTML Code:
global $bfa_ata, $bfa_pagetemplate_name, $post; HTML Code:
body.page-template-no-menu-php #imagecontainer {border-top: 37px solid #eeeeee;} |
Thanks ... really appreciate you taking the time to do this ... but .....
Followed your instructions exactly (except for the CSS inserts bit for adjusting the spacing), went into wordpress and there's a new page template called JUGGLEDAD's multi column/custom query. Selected that for my landing page. Not only is the menu still there but it's pulling through an extract of the blog posts to the page! Should be blank ..... http://www.max-inheritance.co.uk/landing-page/ |
That templete has been probided with the theme since about 3.7.1.
If you followed the directions you should have a second templete called 'no menu' |
I'#m using Atahualpa 3.7.12. In Appearance>Editor I can see the no-menu.php file but within the page section I only have default and the JUGGLEDAD one (which I've never noticed before - hence thinking it was the result of doing the above!)
Hmm ok ... so why is my no menu template not visible? |
should be working...if you send me a PM with an admin id/pw I'll take a peek
|
go back and follow the directions exactly
|
OK thanks ... sorry, the instructions made it sound like I only needed to add the CSS Inserts bit to change the spacing - not that that bit was essential to make it show up!
So I have the no-menu template active ... but now there's a grey overlay where the menu would have been! |
that's from the CSS - you can change that to what ever color you want. it is there so the total header area is the same on pages with the menu and without. you could change it to 'transparent'
|
Thanks, fixed now - really appreciate your help!
|
All times are GMT -6. The time now is 12:57 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.