Home / category / Change “select category” name within category dropdown widget
  • How to Change “select category” name within category dropdown widget

    change-select-category-name-within-category-dropdown-widget

    Adding this snippet to the functions.php of your wordpress theme will let you change the name displayed within the select menu category dropdown widget.

    wordpress snippet : PHP

    <>
    function _category_dropdown_filter( $cat_args ) {
    	$cat_args['show_option_none'] = __('My Category');
    	return $cat_args;
    }
    add_filter( 'widget_categories_dropdown_args', '_category_dropdown_filter' );
    

    ( WordPress codex functions, hooks, in this snippet. )

    widget_categories, get_categories, add_filter, __, _n,
  • Anonymous

    Awesome. How would you accomplish this same thing for the Archives widget?

  • DJEB

    Thanks for this. The solution I was after.