How to Make a Page Menu Dropdown with Hierarchy? (2 posts)

  1. tankard
    Posted 3 years ago #


    I'm trying to make a fancy dropdown menu for my pages. Some of my pages have subpages (children), some don't. I've been playing with the wp_list_pages function but I cannot get the children to fit in. My static code looks like this and the question is how do I make it dynamic. Any ideas please?

    <ul id="menu">
    <li><a href="#">Page Element 1</a>
                        <ul class="dropdown">
    		<li><a href="#">Child 1</a></li>
                    <li><a href="#">Child 2</a></li>
                    <li><a href="#">Child 3</a></li>
                </li><!-- End Page Element -->
        </ul><!-- End Menu -->
  2. alchymyth
    Forum Moderator
    Posted 3 years ago #

    instead of trying to change the output of wp_list_pages() to match your static code, try to match the css to the output of wp_list_pages()


    can you post a link to your site with the menu activ?

Topic Closed

This topic has been closed to new replies.

About this Topic