SearchWP

This Documentation is for SearchWP Version 3

Available since: 2.9

searchwp_engine_content_type_applicable

View Parameters »

When SearchWP builds an engine configuration it checks to see what features are supported by each available post type. If you’d like to override this behavior you can use this hook to do so.

Example: to prevent SearchWP from making Excerpts available for Posts, add the following to your theme’s functions.php:

<?php
// Prevent SearchWP from allowing an Excerpt weight for Posts on the settings screen
add_filter( 'searchwp_get_supports_for_post_type', function( $applicable, $context ) {
if ( 'post' === $context['post_type'] && 'excerpt' === $context['supports'] ) {
$applicable = false;
}
return $applicable;
}, 10, 2 );
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$applicable Boolean

Depends on supports

$context Array

Contains post_type and supports keys

[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]