wp_query_search_exclusion_prefix WordPress Filter Hook

The wp_query_search_exclusion_prefix Wordpress hook allows you to exclude certain terms from the search results. This can be useful if you want to exclude certain terms from the search results that are not relevant to the search.

apply_filters( 'wp_query_search_exclusion_prefix', string $exclusion_prefix ) #

Filters the prefix that indicates that a search term should be excluded from results.


Parameters

$exclusion_prefix

(string)The prefix. Default '-'. Returning an empty value disables exclusions.


Top ↑

Source

File: wp-includes/class-wp-query.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More