Note: You are viewing the documentation for Version 3View Version 4 Docs

Documentation

View the installation guide, browse the Knowledge Base, find out about SearchWP's many hooks, get support

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()

Fix keyword search on your site. No coding required!

Now you can utilize all of the content that's gone unrecognized by native WordPress keyword search instantly with SearchWP

Get SearchWP