For your custom post types and your blog, you can use get_post_type(). For your About parent page, if the pages only go one level deep, you can check $post->post_parent
to see if it’s the about page. Otherwise, you can use get_post_ancestors() and check that array to see if your About page is in it!
Related Posts:
- Why does this search.php not work?
- 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?
- Display search results within the same page
- Insert DIV container below 1st search result
- How to make WordPress search prioritise page titles?
- How to add the author search in the default wordpress search?
- How do I redirect /search/ to wordpress search template?
- 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
- Turning Broken URLs Into Search Terms?
- Change the Search Base in a multi language wordpress
- Search uses index.php instead of search.php on renaming search field from “s”
- Changing the default WordPress search action
- Set default text for the_search_query();
- Noindex, nofollow stuck on homepage
- What are the different options for excluding certain post types from search results?
- Is_search not working on search results page
- Search in post title and custom fields
- How to change users smart quotes to dumb quotes in search bar?
- Trim the search result around the search word
- Need to do blank search.
- Searching custom fields is removing search on the post_title column
- Edit search results in order to advertise
- Search function works improperly
- WordPress, fetching users with an exact match in a string of comma separated values in user_meta
- search form redirects to home
- How can I hide uncategorized products from search results?
- Exclude html from search results (image names, etc.)?
- documentation for wordpress 3.7 keyword
- WordPress Search not picking up text provided by a Plugin
- What does wordpress search, search?
- How to combine two get_users() array?
- why pre_get_posts works fine in post type archive, but not in search result list?
- How to get started?
- Search not working. Appending a “
- Search posts by Tag
- Change Twentyeleven Search Form Text
- redirected to the login screen when I do a blank search
- Add Google custom search to wordpress.com [closed]
- Changing default wp search string
- How do I exclude a specific page (and child pages) from the search results?
- Sort WP Search results by date
- How to pass data to wordpress page (without GET parameter)
- Cannot pass ‘S’ parameter more than two letters
- Check If search query contains something?
- Show search count by post type
- How to have multiple instances of the same taxonomy in a search form
- How to search for post content and attached file names
- Alter BuddyPress member search to include search on added profile fields [closed]
- Enhancin 404 to contain a search from URL
- Checkboxed term search
- Searching for one letter returns extra empty post
- Search using ACF repeater
- search custom table in wp database with searchform
- How to track searches using the REST API?
- content-search.php duplicating the output for a certain post type
- Form for search pages by meta datas
- WordPress REST API Search decoded URL with cyrillyc symbols
- Hide Search Form above results
- searchform.php not included by get_search_form when using wp_dropdown_categories
- Modify wordpress search to search only pages and load matched page not search results
- How to pass variable to get_search_form()?
- Problem with search results page
- Why the search results are wrong in search posts form?
- Search result page as a new page
- Search isn’t displaying all results
- How to use regular page template for search results?
- Search Engine Visibility Issue in WordPress
- Page has no template
- Search only blog posts on blog page
- Allow users to search for other users in WordPress
- 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
- How to stop the search results from loading the wrong template?
- search form display no result
- WordPress search not able to find text in url
- Search & Replace trailing strings
- Returning the entire line of a custom search result filter
- Page/Post path in Search Results
- How we filter the search base on post-meta tags
- Form Data Causes “Page Not Found”
- Search query with quotes
- WordPress search form and input type=”image”
- Search options/filters
- Search Results with googlemaps
- 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?
- Making ACF fields appear in search results
- 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