Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Page & Category Menu Bars »

[SOLVED] Page template with no menu


  #1  
Old May 7, 2013, 05:54 AM
prooffairy
 
73 posts · Oct 2010
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
  #2  
Old May 7, 2013, 06:46 AM
juggledad's Avatar
juggledad
 
23,626 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
you don't need a template, just some CSS like
HTML Code:
body.home #menu1 {display:none;}
  #3  
Old May 7, 2013, 07:29 AM
prooffairy
 
73 posts · Oct 2010
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!)
  #4  
Old May 7, 2013, 10:35 AM
juggledad's Avatar
juggledad
 
23,626 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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.
  #5  
Old May 9, 2013, 08:20 AM
prooffairy
 
73 posts · Oct 2010
"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?
  #6  
Old May 9, 2013, 01:53 PM
juggledad's Avatar
juggledad
 
23,626 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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 
list($bfa_ata, $cols, $left_col, $left_col2, $right_col, $right_col2, $bfa_ata['h_blogtitle'], $bfa_ata['h_posttitle']) = bfa_get_options();
get_header(); 
to
HTML Code:
<?php
/*
Template Name: no menu
Version: 1.0

LICENSE:

   "no menu" is a template for the Atahualpa theme 
   Copyright (C) 2013 Paul M Woodard, The User's Guru (www.theusersguru.com)

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   For a copy of the GNU General Public License go to 'www.gnu.org/licenses'
   
*/
 ?>
<?php 
list($bfa_ata, $cols, $left_col, $left_col2, $right_col, $right_col2, $bfa_ata['h_blogtitle'], $bfa_ata['h_posttitle']) = bfa_get_options();
global $bfa_pagetemplate_name;
$bfa_pagetemplate_name = 'no-menu.php';

get_header(); 
2 - edit bfa_header_config.php (this is in the 'functions' subfolder of the theme)
- change lines 4-16 from
HTML Code:
	global $bfa_ata, $post;
	$templateURI = get_template_directory_uri(); 
    $homeURL = get_home_url();  

	// Since 3.6: bfa_header_config() instead of bfa_header_config($header_items)
	$header_items = $bfa_ata['configure_header'];
	
	$page_menu_bar	= ''; 		$cat_menu_bar	= '';  		$logo_area	= '';  
	$header_image	= '';  		$horizontal_bar1	= ''; 	$horizontal_bar2	= ''; 

	// Page Menu Bar
	if ( strpos($header_items,'%pages') !== FALSE OR strpos($header_items,'%page-center') !== FALSE 
	OR strpos($header_items,'%page-right') !== FALSE ) {
to
HTML Code:
	global $bfa_ata, $bfa_pagetemplate_name, $post;
	$templateURI = get_template_directory_uri(); 
    $homeURL = get_home_url();  

	// Since 3.6: bfa_header_config() instead of bfa_header_config($header_items)
	$header_items = $bfa_ata['configure_header'];
	
	$page_menu_bar	= ''; 		$cat_menu_bar	= '';  		$logo_area	= '';  
	$header_image	= '';  		$horizontal_bar1	= ''; 	$horizontal_bar2	= ''; 

	// Page Menu Bar
	if ( ( strpos($header_items,'%pages') !== FALSE OR strpos($header_items,'%page-center') !== FALSE 
	OR strpos($header_items,'%page-right') !== FALSE ) AND ($bfa_pagetemplate_name !== 'no-menu.php') ){
at this point you are set other than maybe some customizing in the css insert to keep the space taken by the menu. You can do that by adding something like this (this assumes you have the image following the menu in the header configuration) to ato->Add HTML/CSS Inserts->CSS Inserts
HTML Code:
body.page-template-no-menu-php #imagecontainer {border-top: 37px solid #eeeeee;}
Hope this helps.
  #7  
Old May 10, 2013, 01:52 AM
prooffairy
 
73 posts · Oct 2010
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/

Last edited by prooffairy; May 10, 2013 at 01:52 AM. Reason: Edited to add page link
  #8  
Old May 10, 2013, 02:25 AM
juggledad's Avatar
juggledad
 
23,626 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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'
  #9  
Old May 10, 2013, 03:51 AM
prooffairy
 
73 posts · Oct 2010
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?
  #10  
Old May 10, 2013, 04:05 AM
juggledad's Avatar
juggledad
 
23,626 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
should be working...if you send me a PM with an admin id/pw I'll take a peek
  #11  
Old May 10, 2013, 04:45 AM
juggledad's Avatar
juggledad
 
23,626 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
go back and follow the directions exactly
  #12  
Old May 10, 2013, 05:08 AM
prooffairy
 
73 posts · Oct 2010
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!
  #13  
Old May 10, 2013, 05:14 AM
juggledad's Avatar
juggledad
 
23,626 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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'
  #14  
Old May 10, 2013, 05:38 AM
prooffairy
 
73 posts · Oct 2010
Thanks, fixed now - really appreciate your help!

Bookmarks

Tags
menu, page template

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Add Page Menu to Dump Template pvelte Page & Category Menu Bars 6 Dec 4, 2012 05:50 PM
Custom Page Template Alters Page Order In Menu Bar RichardG Page & Category Menu Bars 1 Sep 8, 2011 04:31 AM
Create a Page Template that displays Only One Page Menu Item treeplant Page & Category Menu Bars 0 Apr 20, 2010 02:41 AM


All times are GMT -6. The time now is 01:32 PM.


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