Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if (have_posts()) : ?>
- <?php while(have_posts()): the_post(); ?>
- is_admin() || add_filter( 'posts_search', function( $search )
- {
- empty ( $search ) || add_filter( 'posts_where_paged', function( $where ) {
- return preg_replace(
- '~post_type IN ((.*)'page',?~',
- 'post_type IN (1',
- $where
- );
- });
- return $search;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement