Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    You need to grab the search terms from the main query (global $wp_query) and include them in the query args for your custom query.

    Your query would need to include a parameter ‘post_type’=>’movies’ or whatever your custom post type is called.

    For example:

    $args = array(
    'post_type' => 'movies',
    'posts_per_page' => 2000,
    'order'=> 'ASC',
    'orderby' => 'title'
    );

    Hope this helps.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Search Form to Work With Custom Query’ is closed to new replies.