Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function searchfilter( $query ) {
- if ( $query->is_search && ! is_admin() ) {
- if ( is_page( '285' ) ) {
- $query->set( 'post_type', array( 'projects' ) );
- }
- }
- return $query;
- }
- add_filter( 'pre_get_posts', 'searchfilter' );
Add Comment
Please, Sign In to add comment