Jump to content
Sign in to follow this  
bamankwata

Custom Sections Not working

Recommended Posts

bamankwata

I need two layers of navigation on my site so I tried to create a custom section using the GlobalNav tutorial. However the globalNav menu is not showing up in the options for menus in wordpress admin. Below is the code. I registered the globalnav in the functions file. Below is the code. class BaseGlobalNav extends PageLinesSection { function __construct( $registered_settings = array() ) { $name = __('GlobalNav Section', 'pagelines'); $id = 'globalnav'; $settings = array( 'description' => 'Creates a Global nav Section in Base'. 'workswith' => array('header'), 'icon' => CHILD_IMAGES . '/icon-pullquote.png' ); parent:GDN__construct($name, $id, $settings); } function section_template() { ?><div id="primary-nav" class="global"><?php if(function_exists('wp_nav_menu')){ wp_nav_menu( array('menu_class' => 'main-nav','container' => null, 'container_class' => '','depth' => 3, 'theme_location' =>'globalnav', 'fallback_cb' => 'nav_fallback')); } ?></div><?php } function section_persistent(){ register_nav_menus( array( 'globalnav' => __('Global Navigation', 'pagelines' ))); } } /* End of section class - No classing tag needed */

Share this post


Link to post
Share on other sites
bamankwata

Thanks for the reply Catrina, so I created the custom function in the "sections" folder in the platformbase folder and modified the function file in the platformbase file. Was that the right thing to do?

Share this post


Link to post
Share on other sites
bryan-hadaway

Well, is everything working now or are you still experiencing problems? Thanks, Bryan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×