Skip to content

Instantly share code, notes, and snippets.

Created January 20, 2016 16:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save anonymous/7b3c9402c4afb0bcf005 to your computer and use it in GitHub Desktop.
Save anonymous/7b3c9402c4afb0bcf005 to your computer and use it in GitHub Desktop.
<?php
// Custom Post Types in die WordPress-Suche integrieren
function ah_searchAll( $query ) {
if ( $query->is_search ) { $query->set( 'post_type', array( 'site','plugin', 'theme','person' )); } // Custom Post Types noch anpassen
return $query;
}
add_filter( 'the_search_query', 'ah_searchAll' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment