Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Created January 29, 2018 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jchristopher/1c9032a3d51444b6cc810a492e75db38 to your computer and use it in GitHub Desktop.
Save jchristopher/1c9032a3d51444b6cc810a492e75db38 to your computer and use it in GitHub Desktop.
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