Hi, I'm using this to add a category drop down on my blog. How can I make the default value "Select Category". Right now the drop down just begins with my first category name once the site loads.
<?php wp_dropdown_categories(); ?>
Thanks in advance.
Hi, I'm using this to add a category drop down on my blog. How can I make the default value "Select Category". Right now the drop down just begins with my first category name once the site loads.
<?php wp_dropdown_categories(); ?>
Thanks in advance.
Anyone have any idea? Thanks much.
The documentation on wp_dropdown_categories shows that you can add a parameter of show_option_all
<?php
wp_dropdown_categories( array(
'show_option_all' => 'Select Category'
) );
?>
So you can set that to "Select Category", which will return a value of 0 if it is left on that option.
Hi,
So you can set that to "Select Category", which will return a value of 0 if it is left on that option
How to set the value of "Select Category" to a value other than 0?
I tried setting 'selected' value, but still the "Select Category" returns the value 0.
Please help me with this.
This topic has been closed to new replies.