The quick and simple method might be to create a custom page template and have the search form send the user to the page that you create with it.
<?php
/*
Template Name: Location Results
*/
if ( isset($_REQUEST['search_field_name']) && !empty($_REQUEST['search_field_name']) ) {
# Read and escape the input data
# Do your query, grab your results
# Display your results to the user
} else {
# No results found. Display search form again with note to enter something.
}
You could then create a new page, selecting this page template and edit your form to send the results to it.
There are other ways to do this, but this is a fairly quick and easy method that I use now and again.
Related Posts:
- how to get this tax_query working?
- AJAX search on post pages by custom post type
- How to make a WP_Query search with custom post types?
- Search multiple custom fields by using meta_query
- How to put custom post types on front page
- How to add multiple images to a custom post type single post?
- Search Custom Post Type with all meta attached?
- How Do I Use WP_Query to Run This Database Query as Search Result?
- Custom Search form not working in localhost
- Group search results by post type, but hide post types with no results
- Search tags in CPTs
- How do I create an archive page for standard posts?
- Including Custom Meta with posts_where query
- Including metaboxes from custom post types in global search — continued
- How to have this permalink structure: post_type/postname/custom_inner_page
- Advanced search form with filters for custom taxonomies
- Custom WP_Query doesn’t display all posts
- Custom filter for main search: how to exclude specific post_type from search results
- WP_Query with custom post type ID
- Select2 AJAX and WP Query Returns ALL and does not filter
- find custom post type post by searching its custom field with my string
- Make Next and Previous on single-$posttype.php use the same order as archive-$posttype.php
- Get next and prev item from custom WP_Query and Custom Post Type
- Change search query in wordpress custom post type
- How to search through all child taxonomies using WP_Query?
- Search Function not searching correct custom_post_type even though post_type is defined in search args
- post_type incorrect for custom post type
- Live search by custom tag
- Create Second Search Page Only for Custom Post Type
- Why get_posts() returns empty array while I am trying to get posts from some specific taxonomies and work properly with others?
- Conditional posts in WP_query for search
- Loop carousel slider in wordpress
- Manually build WP_Query
- WP_Query with custom post type search showing all results every time
- Search form to find custom meta box generated data
- Custom post type blog pagination conflict
- Customising wordpress search and using $_GET[“s”]
- Why does ‘exclude_from_search’ exclude a custom post type from WP_Query?
- How to manage wordpress knowledge base/wiki/posts collections
- Searching Custom Posts content with JQuery
- WordPress search results grouped by post type
- Custom post archive with search, is_search() is false?
- Default WordPress Query for a Specific Custom Post Type URL
- Get a custom post type’s taxonomy type term names displayed as checkboxes and filter
- Pagination doesnt work in custom post type
- Archive links for custom post types
- Category Search / Custom Post Type search on my website. Custom Post Types that are “page-like”?
- Include custom post type custom taxonomies in Categories widget
- Show message when query has no posts
- Template Hierarchy for custom post type pages
- How to sort a WP_Query by a custom field AND ALSO filter by a different custom field
- WP_Query of custom post type sorted by meta_key has unexpected results
- How to show all taxonomies within custom post type loop
- Should Custom post types and fields be in the theme files or in a custom plugin packed into the theme?
- Custom post type’s posts are not showing anywere but in xml sitemap
- Undefined $post in wp_query
- Returning a custom content types with meta values
- Adding Multiple Post Types to Query [duplicate]
- WP_Query not resetting after wp_reset_postdata
- How to get the post terms from a child taxonomy
- Custom Category Walker with Image, Fallback to Most Recent Post in Category Image
- display posts of custom post type with custom taxonomy
- WP_Query order by two values
- How to Use Custom Meta Field Instead of CPT Title in Post URL
- Get current user id
- Custom Search | check multiple meta_value for search value
- List categories, subcategories and posts from custom taxonomy and custom post type
- Hide custom post type from search based on custom taxonomy
- How to query for posts (hierarchical custom post type) that have children but are NOT top level?
- Custom post type and custom taxonomy 404 on page 2
- WP Query results showing posts outside of category ID
- tax_query (if the terms are empty)
- Custom post type to lead to single post type instead of shortcode modal
- Display custom post type for specific user
- Cannot get custom posts by category
- Custom Post type loop with ACF not displaying properly
- Get all post from a post type
- What is the correct term for a tool that filters content based on metadata?
- How to get Custom Post Type with Categories wise in WordPress using wp_query
- Assign a template to a custom post type when displayed by the main loop on the home page
- Shortcode with WP_Query more than once on one page
- Custom Post type content within a slider
- Trying to add a class to post links
- Pagination on search results page
- How to Query in WordPress which shows Alphabetic Posts?
- Can’t change posts per page in WordPress Post Type Query
- List latest post out of 2 custom post types
- If Post type use sidebar (‘tree’)
- postsperpage value not being applied
- Methods for development wordpress themes [closed]
- Ideas on how to organize a project [closed]
- How to count other posts not having specific taxonomy terms?
- Create a WP_Query where if the first value of the first row is equal to the second compare other value
- Exclude latest post from WP_Query taxonomy term loop
- Custom Post Type – after disable ‘Add New’, I can’t edit and delete post
- Pagination for search results of custom post type [duplicate]
- Filter posts of custom post type by meta key in (List All Section)
- Group by custom field value (start and end times)
- Sort results without WP_QUERY?
- WP_Query get post from a category and from another post type