Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function gg_postssearch($query) {
- if( is_single( 'post' ) || is_post_type_archive( 'post' ) {
- if( $query->is_search ) {
- $query->set( 'post_type', 'post' );
- }
- return $query;
- }
- }
- add_filter( 'pre_get_posts',' gg_postssearch' );
Add Comment
Please, Sign In to add comment