Forums

[resolved] How can I add my nav menu as part of a tag? (1 post)

  1. egr102
    Member
    Posted 3 months ago #

    I'm trying to put a list of all main links within a little drop down menu. By drop down I mean the form kind not one that will display sub menus on mouse hover.

    This is the code I would like to generate:

    <select>
    	<option value="" selected="selected">Select</option>
    	<option value="/">Home</option>
    	<option value="/services.htm" >Services</option>
    	<option value="/products.htm">Products</option>
    	<option value="/blogs/five-simple-steps-blog">News</option>
    	<option value="/pages/about-us" >Work</option>
    	<option value="/pages/support" >Contact</option>
    </select>

    Here is my WP code:

    <select>
    	<option value="" selected="selected"><?php wp_list_pages(); ?></option>
    </select>

    All I keep getting is a li list within my select box. How do I remove those tags
    and replace it with a whole bunch of option tags instead?

Reply

You must log in to post.

About this Topic