1096 posts
  • 5 Years of Membership
  • Affiliate Level 1
  • Beta Tester
  • Collector Level 2
+5 more
Gareth_Gillman
says

I am doing a html > WP convert and I am stuck on the menu.

On this page, in the menu it shows the sub nav for that page.

How would I do that using the WP drag ‘n drop menu system? I know I could create different menu’s for each page with a sub nav and use the is_page() function but is it possible using one menu?

3256 posts
  • Affiliate Level 4
  • Author Level 9
  • Collector Level 2
  • Top Monthly Author
+11 more
ParkerAndKent
says

You must use the wp_nav_menu function http://codex.wordpress.org/Function_Reference/wp_nav_menu and try to adapt its output to your needs, also if is better to do the opposite.

Parker

ProgressionStudios
ProgressionStudios Recent Posts Threads Started
228 posts
  • Power Elite Author
  • Top Monthly Author
  • Featured Author
  • Most Wanted Winner
+13 more
ProgressionStudios
says

You just want to display the sub-pages when you are on that page only correct? You can use CSS and keep it simple. It would be something like this:

ul ul {display:none;}
ul li.current-menu-item ul, ul li.current_page_item ul, ul li.current-menu-parent ul {display:block;}
1096 posts
  • 5 Years of Membership
  • Affiliate Level 1
  • Beta Tester
  • Collector Level 2
+5 more
Gareth_Gillman
says

You must use the wp_nav_menu function http://codex.wordpress.org/Function_Reference/wp_nav_menu and try to adapt its output to your needs, also if is better to do the opposite. Parker

I am using wp_nav_menu, know any sites that will have a guide on how to accomplish this?

1096 posts
  • 5 Years of Membership
  • Affiliate Level 1
  • Beta Tester
  • Collector Level 2
+5 more
Gareth_Gillman
says

You just want to display the sub-pages when you are on that page only correct? You can use CSS and keep it simple. It would be something like this: ul ul {display:none;}
ul li.current-menu-item ul, ul li.current_page_item ul, ul li.current-menu-parent ul {display:block;}

Brilliant, thank you. Worked a treat

1096 posts
  • 5 Years of Membership
  • Affiliate Level 1
  • Beta Tester
  • Collector Level 2
+5 more
Gareth_Gillman
says

Having an issue with the css, can’t get the sub nav to display under the open menu like the link I posted above.

The link is http://www.garethgillman.co.uk/wordpress/wm/uk-visa-service/.

Any help would be appreciated.

147 posts
  • 4 Years of Membership
  • Affiliate Level 2
  • Author Level 9
  • Collector Level 2
+3 more
FlexiPress
says

if you need vertical style – drop down menu – and supports more than three levels, you can try jquery superfish…

http://users.tpg.com.au/j_birch/plugins/superfish/

integrating superfish with wp_nav_menu is easy,,,

wp_nav_menu( array( 'theme_location' => 'your-menu-location', 'menu_class' => 'superfish' ) );

http://codex.wordpress.org/Function_Reference/wp_nav_menu

1096 posts
  • 5 Years of Membership
  • Affiliate Level 1
  • Beta Tester
  • Collector Level 2
+5 more
Gareth_Gillman
says

Bump, can anyone help?

I am sure it’s a css issue but can’t find the code to make it work.

ProgressionStudios
ProgressionStudios Recent Posts Threads Started
228 posts
  • Power Elite Author
  • Top Monthly Author
  • Featured Author
  • Most Wanted Winner
+13 more
ProgressionStudios
says

It looks like a simple CSS issue your having. The unordered list is open inside of your list item. I assume your CSS styles don’t account for this. The actual show/hide looks like it’s working correctly.

The UL list is showing up like so:
<li><a href="">List item open</a> <ul><li><a href="">Content 2</a></li></ul></li>
1096 posts
  • 5 Years of Membership
  • Affiliate Level 1
  • Beta Tester
  • Collector Level 2
+5 more
Gareth_Gillman
says

I fixed it (finally) but changing the code slightly.

Thanks for your help

by
by
by
by
by
by