Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Customowa wyszukiwarka
- function ws_change_search($query) {
- if (!is_page()) {
- if ( $query->is_search && is_main_query() ) {
- $query->set( 'post_type', 'post' );
- }
- return $query;
- }
- }
- add_filter( 'pre_get_posts','ws_change_search' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement