Customize Categories on the ClassiPress Search Form

The ClassiPress Search Form includes a dropdown list of ads categories, which allows refining search results by a selected category.

ClassiPress Search Form

It uses the WordPress function wp_dropdown_categories() to generate categories dropdown list HTML with a set of options that provides the ClassiPress function cp_get_dropdown_categories_search_args(). This function has a filter cp_dropdown_search_bar_args which you can use for complete customizing the Categories dropdown.

This is how it looks by default:

Default ClassiPress search categories dropdown list

Below you will find the filter specification and some useful customization examples.

Filter 'cp_dropdown_search_bar_args' parameters 'show_option_all' - (string) Text to display for showing all categories. Default "All Categories"'show_option_none' - (string) Text to display for showing no categories. Default empty.'option_none_value' - (string) Value to us…
Read more about Customize Categories on the ClassiPress Search Form
  • 32