1 comment

  1. You should create your own form with input field for search, and catch data after post. You could split the words for example with explode() and put them into an array. You need to check if words exists as tag, so you need to loop through your array and check if it exists in get_tags($args). After that you should have an array with only useful tags. Now you can use get_posts()

    $postargs = array(
            'posts_per_page'   => '-1',
            'tag__and'         => YOUR_ARRAY,
            'orderby'          => 'date',
            'order'            => 'DESC',
            'post_type'        => YOUR_CUSTOM_POST_TYPE,
            'post_status'      => 'publish',
            'suppress_filters' => true 
    

    );

    $posts_array = get_posts( $postargs );
    

    You only need to loop (foreach) through your post-array and output results.

Comments are closed.