Try the following approach.
Get the page using get_page_by_path()
http://codex.wordpress.org/Function_Reference/get_page_by_path
$page = get_page_by_path( 'university-guide' );
$search_query['post_type'] = 'page';
$search_query['post_parent'] = $page->ID;
The following snippet was taken from Codex page: Creating a search form
http://codex.wordpress.org/Creating_a_Search_Page
global $query_string;
$query_args = explode("&", $query_string);
$search_query = array();
foreach($query_args as $key => $string) {
$query_split = explode("=", $string);
$search_query[$query_split[0]] = urldecode($query_split[1]);
} // foreach
$search = new WP_Query($search_query);
Search results are obtained using WP_Query instance.
You can use WP_Query codex page to learn more about available options.
https://codex.wordpress.org/Class_Reference/WP_Query
Related Posts:
- Search is always exact [closed]
- Empty search returns home page, how to return not found search page?
- How to look at code in WordPress repositories without downloading?
- Insert DIV container below 1st search result
- Search in WordPress – Difference of searchpage.php, searchform.php and search.php?
- How to make WordPress search prioritise page titles?
- How to add the author search in the default wordpress search?
- How to search for users based on added user metadata
- Search by Post ID and display content of the post in search result
- Let user change posts per page
- Exclude top-level pages from search results
- Turning Broken URLs Into Search Terms?
- How can I implement faceted search with WordPress 3.x?
- Search uses index.php instead of search.php on renaming search field from “s”
- Search results URL without query string variables
- How to control WordPress Search Behavior?
- Changing the default WordPress search action
- Set default text for the_search_query();
- Changing the search results destination URL
- What are the different options for excluding certain post types from search results?
- Search in post title and custom fields
- How to change users smart quotes to dumb quotes in search bar?
- Making a list of post tags in string
- Trim the search result around the search word
- WP_User_Query search with multiple search queries
- Searching custom fields is removing search on the post_title column
- Edit search results in order to advertise
- Search function works improperly
- How to make wordpress default search to woocommerce search
- pre_get_posts action: Search by post_title and post_content with different search phrase in the same query
- Is there a wordpress plugin enabling an autocomplete search box, then jump to page?
- Date_query problems
- How to stop WordPress Search form from searching only in current page?
- Need to return a list based on Slug
- Creating a Searchable PDF Archive of Publications
- Display post titles that match string in post content
- Using parent slug variable to display proper submenu not working properly
- Get Adjacent post by search query
- How to exclude pages from WP search based on page title
- why pre_get_posts works fine in post type archive, but not in search result list?
- How to get started?
- Search.php display results differently based on post type
- Search Form Based On Tutorial Not Working
- Improved WordPress search functionality and search form plugin
- how to show Author information in search results
- Use wordpress search to display results within a post
- How to query two meta fields and display results between them
- Sitelinks Search box schema confusion
- how to search everything
- changing search result from only excerpt to full content
- Cannot pass ‘S’ parameter more than two letters
- Localization of WP theme
- How to have multiple instances of the same taxonomy in a search form
- WP + Google analytics = /search?
- Search result count not matching actual result
- How to search for post content and attached file names
- Why does this search.php not work?
- Breadcrumbs: Search result not displayed when static page is on top
- Can’t place two custom post types into the WordPress search query?
- Searching for one letter returns extra empty post
- How to create a search form with multiple search fields
- WordPress custom search only works from some pages
- REST API: Search products only in the names
- Bots using internal wordpress search
- Altering search results to handle a post meta field not working in current WordPress
- WordPress Search by tags
- pulling in external JSON search results into WordPress
- How to create a custom filter in WordPress?
- WordPress search post using unicode
- search results in custom template search.php
- Create search box on Archive Custom post type
- How to pass variable to get_search_form()?
- Why the search results are wrong in search posts form?
- Search isn’t displaying all results
- How to use regular page template for search results?
- Search only blog posts on blog page
- Auto search field without buttons, shows first result from search page
- Can I set up a search box that uses fields?
- How to Search Users on the Base of Latitude and Longitude in Users meta_key and meta_value
- Returning the entire line of a custom search result filter
- search does not yield access restricted results
- Customizing Home Page with Pagelines Platform
- Search Limited to Categories Not Working
- Google Search and Own Website Search?
- How we filter the search base on post-meta tags
- Make search result returned only from tags! [duplicate]
- Form Data Causes “Page Not Found”
- WordPress search form and input type=”image”
- Search options/filters
- How to search pdf attachment?
- Website Search Results Not Showing Images
- How to search for articles containing two words?
- Wp eCommerce meta information search [closed]
- How do I create a search form that searches only within a custom post type?
- Two Querys in one Search – Category-Tag nightmare – HOW?
- Code in the excerpt of the search page
- WordPress REST API response – not returning results from custom taxonomy, only from title
- Members location sortable based on UK Postcode
- I had removed my phone number from my website footer, but months later it still appears once I look it up on google, how to remove it?
- search posts by POST ID