I'm working on a wordpress theme that uses dropdowns for part of the site navigation.
I'm using wp_pages_dropdown and wp_dropdown_categories to output my menus as a dropdown jump menu, this is all good,works fine, but I would like to add a 'home' link to the end of the list of <option>'s
I have been having a go at it - my html/css is spotless but I am not a programmer, can any one help me out, I'd really appreciate it.
<?php wp_dropdown_pages('show_option_none=Select Page');?>
<?php wp_dropdown_categories('show_option_none=Select Category'); ?>
I am thinking that I need to somehow work <?php echo get_option('home'); ?>
into it somehow. Any suggestions? thanks.
I'd say the simplest approach is to just filter the output of
wp_dropdown_...
and inject your option just before the closingselect
tag;My code looks like this, and in my functions.php code I edited the value to be 0.