Hi,
I would like to change the name in the drop down menu but can´t find it...see attached image
http://www.thailandliving,se
thanks
Charlotte
Peter Michael answers:
Change 'Innehåll' or 'Select Category' ?
Charlotte Raboff comments:
Change Select category..
Peter Michael comments:
Add this to your functions.php, change 'Choose Category' to whatever you need.
function _category_dropdown_filter( $cat_args ) {
$cat_args['show_option_none'] = __('Choose Category');
return $cat_args;
}
add_filter( 'widget_categories_dropdown_args', '_category_dropdown_filter' );
Charlotte Raboff comments:
thanks but in the theme functions.php I find only this code:
<?php
if ( function_exists('register_sidebars') )
register_sidebars(4);
?>
Charlotte Raboff comments:
Sorry I was to quick to reply........anyway I have added your code to the functions.php but look at the website, the code is visible at the top... most be somethings missing....
Peter Michael comments:
Here you go, your new functions.php:
<?php
# Register Sidebars
if ( function_exists('register_sidebars') ) {
register_sidebars(4);
}
# Changes the first entry text for the category dropdown widget ('SelectCategory')
function _category_dropdown_filter( $cat_args ) {
$cat_args['show_option_none'] = __('SelectCategory');
return $cat_args;
}
add_filter( 'widget_categories_dropdown_args', '_category_dropdown_filter' )
?>
HTH
Charlotte Raboff comments:
Shall I replace all the code at the functions page with your last code?
Where do I change the name in this code?
Peter Michael comments:
Yes, replace everything with my code. Change the name like this:
$cat_args['show_option_none'] = __('Välj en destination');
Charlotte Raboff comments:
Great, thanks:)
Peter Michael comments:
You're welcome ;-)