[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 410
  • Last Modified:

Adding submenu dropdown to my current wp theme top menu?

I have created a new WP Theme and in the header have inserted a top menu / nav ... but it's just 1 level depth.

How do I modify this so that I have show subpages in a dropdown style please?

Here is the current code:
<div class="header_right">

<ul>

<?php wp_list_pages('title_li=&depth=1'); ?>

<li><a href="#" id="signin"></a></li>

</ul> 

</div>

Open in new window


Thanks
0
error77
Asked:
error77
  • 2
1 Solution
 
SSupremeCommented:
just adding other list inside of list:
<ul>

<?php wp_list_pages('title_li=&depth=1'); ?>

<li><a href="#" id="signin"></a>
<ul class="secondlvl"><li>
<ul class="thirdlvl"><li><a></a></li></ul>
</li>
</ul>
</li>

</ul>
0
 
error77Author Commented:
It's not really working as I can see the subitems all the time.
0
 
SSupremeCommented:
oh. you need to apply some css for your element like:
li ul {display:none;}
li:hover ul {display:block;}

But it's easier to find CSS menu, and adjust it as you need.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now