This topic has 7 replies, 2 voices, and was last updated 7 years, 2 months ago ago by Rose Tyler
Hello,
I would like to change “select a category” to “Any Category”
I tried to create a code in PHP, but my code doesn’t work. I read a documentation too.
apply_filters( ‘woocommerce_product_categories_widget_args’,’teste’ );
function teste( $list_args ) {
$list_args[‘show_option_all’] = __(‘Any Category’);
return $list_args;
}
My code is wrong?
Thanks for help.
Hello,
Could you please provide a screenshot of page where you want to change this text?
Regards
Check this link:
Please provide wp-admin access in Private Content.
Regards
OK.
In WPML appears in english. We translated for our languages.
In english we prefer “Any Category”
Thanks for help 🙂
Hello,
Please try to use this code in function.php of your child theme:
add_filter( 'woocommerce_product_categories_widget_dropdown_args', 'et_product_cat_widget' );
function et_product_cat_widget( $args ) {
global $wp_query;
$args = array(
'option_select_text' => __( 'Any Category', 'royal' )
);
return $args;
}
Regards
Tagged: category, dropdown, templates, woocommerce, wordpress
You must be logged in to reply to this topic.Log in/Sign up