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 » Page & Category Menu Bars »

Show sub menu for top level ancestor


  #1  
Old May 2, 2013, 07:11 AM
tysonlt
 
4 posts · May 2013
Hi,

I'm very sorry if this is already on the forum, but my search was fruitless.

I am working on a site: http://backgammon.edieandbup.com/

What I want is for the left sidebar to show a menu of the child pages of the current TOP LEVEL menu. So when you click 'WHO ARE WE?' you get the two child pages listed on the left - all good.

What I want is when you click one of those pages, the menu on the side stays as it was. As it is, it lists children of the current page.

I know how to get the top-level ancestor:

PHP Code:
$parent array_reverse(get_post_ancestors($post->ID));
$first_parent get_page($parent[0]); 
I poked around in the code of the theme, but got to wp_nav_menu() in bfa_new_wp3_menus.php - I couldn't see how to specify the parent.

I have tried a number of plugins and got closest with Custom Menu Wizard, which lets you specify that you want children of the current page. However I want children of the top-level ancestor of the current page.

Is there a way to do this?

Thank you for your help.
  #2  
Old May 3, 2013, 06:47 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Create a custom menu for each page, add a custom menu widget for each menu.
Install the 'widget logic' plugin and set each menu widget toonly display on it's page.

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Custom Top level menu size + span the menu accross the width of the page muthukumarp Page & Category Menu Bars 11 Dec 9, 2011 12:42 PM
[SOLVED] left sidebar, gray block from 1st level appears in front of 2nd level menu i teckerman Sidebars & Widgets 6 Aug 15, 2011 05:37 PM
Issue With Ancestor Text Color jasontbedell Page & Category Menu Bars 0 Feb 17, 2011 08:32 AM


All times are GMT -6. The time now is 07:21 PM.


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