Hi @occreative
There’s a filter hook you can use for Placeholders:
function modify_dropdown_placeholder( $placeholder, $taxonomy ) {
return 'New placeholder';
}
add_filter( 'beautiful_filters_dropdown_placeholder', 'modify_dropdown_placeholder', 10, 2 );
look at what $taxonomy is and change the output accordingly.
That should do the trick for you 🙂
Thank you for the reply, but I don’t know what any of it means! I can paste that code into my child theme’s functions editor, but as is I know it won’t do what I need. I don’t know annnything about functions stuff and so I don’t even know what “look at what $taxonomy is” even means. I’m so sorry, but any way you can be a little more specific for this noob?
Hi,
You can put that into the functions editor and then you need to make an if statement and change the values accordingly.
In your case it should look something like this:
function modify_dropdown_placeholder( $placeholder, $taxonomy ) {
switch( $taxonomy ) {
case 'research_cats':
$placeholder = esc_html__( 'Search by Category' );
break;
case 'research_tags':
$placeholder = esc_html__( 'Search by Letter' );
break;
default:
$placeholder = esc_html__( $placeholder );
}
return $placeholder;
}
add_filter( 'beautiful_filters_dropdown_placeholder', 'modify_dropdown_placeholder', 10, 2 );
Best of luck with your project,
Thank you!!! It still doesn’t work, but maybe I can figure it out now that I have more specific code to work with. I really appreciate it!!