WordPress.org

Ready to get started?Download WordPress

Forums

These 'arguments' don't work for wp-dropdown-categories? (1 post)

  1. Dgold
    Member
    Posted 7 years ago #

    What am I doing wrong in this code? (below) I got this code from this Codex:
    http://codex.wordpress.org/Template_Tags/wp_dropdown_categories

    I'm trying to use some of the "arguments" (options), but 2 odon't change anything about the look of the dropdown:
    show_option_all -- doesn't change anything, I want it to show the word "All" that takes you back to the homepage.

    selected=3 -- doesn't change anything, I want Category #3 to show up in the dropdown menu as the default choice.

    Here is the code I'm trying:

    <li id="categories">
    <form action="" method="get">
       <?php wp_dropdown_categories('show_option_all&show_count=1&selected=3'); ?>
    <input type="submit" name="submit" value="Go" />
       </form>
    </li>

    Do I need to write it a different way, or what?

Topic Closed

This topic has been closed to new replies.

About this Topic