Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function my_searchwp_include( $ids ) {
- if ( isset( $_REQUEST['soort'] ) ) {
- // limit the results to all of the chosen sort documents
- $args = array(
- 'post_type' => 'any',
- 'nopaging' => true,
- 'fields' => 'ids',
- 'tax_query' => array(
- array(
- 'taxonomy' => 'soort',
- 'field' => 'slug',
- 'terms' => $_REQUEST['soort'],
- ),
- ),
- );
- $soort_ids = get_posts( $args );
- $ids = array_merge( $ids, $soort_ids );
- $ids = array_unique( $ids );
- }
- return $ids;
- }
- add_filter( 'searchwp_include', 'my_searchwp_include' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement