323

How to Hide Taxonomies From Quick Search

Powered by WPCodeBox

Learn how to easily hide taxonomies, such as categories, regions, and tags, from the quick search feature on your website. This snippet provides the code to customize your search results for a cleaner user experience.


<?php

/**
 * Author: MyListing Club
 * Author URI: https://mylisting.club
 */

// HIDE CATEGORIES
add_filter( 'mylisting/quicksearch/show-categories', '__return_false' );

// HIDE REGIONS
add_filter( 'mylisting/quicksearch/show-regions', '__return_false' );

//HIDE TAGS
add_filter( 'mylisting/quicksearch/show-tags', '__return_false' );

Other Snippets

WPCodeBox is a WordPress Code Snippets Manager that allows you to share your WordPress Code Snippets across your sites.