apply_filters( 'post_search_columns', string[] $search_columns, string $search, WP_Query $query )

Filters the columns to search in a WP_Query search.


Description

The supported columns are post_title, post_excerpt and post_content.
They are all included by default.


Top ↑

Parameters

$search_columns string[]
Array of column names to be searched.
$search string
Text being searched.
$query WP_Query
The current WP_Query instance.

Top ↑

Source

File: wp-includes/class-wp-query.php. View all references

$search_columns = (array) apply_filters( 'post_search_columns', $search_columns, $q['s'], $this );


Top ↑

Changelog

Changelog
Version Description
6.2.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.