Skip to content

mc_search_no_results

github-actions[bot] edited this page Jun 3, 2026 · 4 revisions

HTML template if no search results. Default <li class='no-results'>" . __( 'Sorry, your search produced no results.', 'my-calendar' ) . '</li>.

Auto-generated Example

add_filter(
   'mc_search_no_results',
    function(
        string $output,
        string|array $term
    ) {
        // Your code here.
        return $output;
    },
    10,
    2
);

Parameters

  • string $output HTML output.
  • string|array $term The search query arguments. Can be a string or an array of search parameters.

Returns

string

Files

apply_filters( 'mc_search_no_results', "<li class='no-results'>" . __( 'Sorry, your search produced no results.', 'my-calendar' ) . '</li>', $term )

← All Hooks

Clone this wiki locally