Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Customize content attributes in SearchWP's engine configuration
<?php
// Customize the 'Excerpt' label for Posts in SearchWP's engine configuration
add_filter( 'searchwp_engine_content_type_label', function( $label, $context ) {
if ( 'post' === $context['post_type'] && 'excerpt' === $context['supports'] ) {
$label = 'Abstract';
}
return $label;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment