Jump to content


Photo
- - - - -
Resolved

Display menu conditionally based on template

menu customization

This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1 caleb

caleb

    Member

  • Members

  • 16 posts

Posted 28 September 2012 - 12:53 AM

Hi,

I want to display a menu on all pages except those based on a certain template. Here's what I'm trying, but it's still showing the menu.


Please Login or Register to see this Hidden Content



Thanks for helping out,

Caleb

#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 17003 posts

Posted 28 September 2012 - 08:18 AM

Hi,

I think the best course of action would be to ask this question on the Wordpress support forums. This is more of a Wordpress related issue than a PageLines one.

#3 caleb

caleb

    Member

  • Members

  • 16 posts

Posted 28 September 2012 - 12:33 PM

I'll try there as well. I guess the question related to pagelines would be what template file, including path, is a page created with template 5 for example, based on such that this statement would return true


if ( is_page_template('pagelines/page.epsilon.php')

#4 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts

Posted 28 September 2012 - 09:05 PM

Caleb,

As you know, we've provided quite a bit of support on this via LIVE, however, it is essentially a customization issue and I'm going to refer you to our Pros section. One of them might be able to help you with this, but it's so complex that neither the forum or LIVE are the proper places to get the right answers.

Please Login or Register to see this Hidden Content



#5 caleb

caleb

    Member

  • Members

  • 16 posts

Posted 30 September 2012 - 05:42 PM

ok, thanks for trying. just to close this out, i couldn't figure out how to get it be conditional on a pagelines template, but i did get it to work based on page id with the following:


add_action('pagelines_before_branding_icons', 'brand_menu');

function brand_menu(){

if ( ! is_page(array(356,681,58,533)) )
wp_nav_menu( array('menu' => 'Main Menu' , menu_class => 'sf-menu'));
}

Someone else may find this useful more generically with the hooks to apply add actions to only certain pages.

#6 mackenzie

mackenzie

    Advocate

  • Members
  • 333 posts

Posted 30 September 2012 - 09:54 PM

The topic was marked as resolved.