Forums

[resolved] Default blank entry for get_catgories_dropdown (3 posts)

  1. funkton
    Member
    Posted 2 years ago #

    hi

    I have this

    <?php wp_dropdown_categories('hide_empty=0&child_of=3&name=Factory');?>

    which works great but I need to put in a blank default entry so if a selection is not made it will return nothing.
    Any ideas?
    Cheers
    Mat

  2. Mark / t31os
    Moderator
    Posted 2 years ago #

    See the "show_option_none" and "show_option_all" parameters.
    http://codex.wordpress.org/Template_Tags/wp_dropdown_categories

  3. funkton
    Member
    Posted 2 years ago #

    worked like a charm

    <?php wp_dropdown_categories('hide_empty=0&child_of=6&name=Factory&show_option_none=PLEASE SELECT');?>

    Nice!

Topic Closed

This topic has been closed to new replies.

About this Topic