SearchWP

This Documentation is for SearchWP Version 3

Available since: 2.8.4

searchwp_indexer_comments_args

View Parameters »

By default SearchWP retrieves all approved comments for the current post when indexing arguments. You can use this hook to customize those arguments:

<?php
add_filter( 'searchwp_indexer_comments_args', function( $args ) {
// TODO: modify $args to meet your needs. Arguments are sent to get_comments()
// @link https://codex.wordpress.org/Function_Reference/get_comments
return $args;
} );
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$args Array

Arguments used to retrieve comments for the post being indexed, sent directly to get_comments()

[wpforms id="3080"]