The custom properties you refer to are dates which a stored in a custom table, and which are joined onto the query for events. At this point in time, when querying events, this table is only joined when only the ‘event’ post type is being queried.
That is, you can search for events – but the dates are only pulled in if you are searching only for events. The following snippet will ensure all front-end (“main”) searches are for events only – which may or not may not be the desired behaviour, but you can of course target specific queries or simply set the post type to ‘event’ when you create your WP_Query
object.
add_action( 'pre_get_posts', 'wpse172161_set_search_post_type' );
function wpse172161_set_search_post_type( $query ){
if( !is_admin() && $query->is_main_query() ){
$query->set( 'post_type', 'event' );
}
}
Related Posts:
- Search widget breaks when using multiple loops?
- Differentiate between posts and pages in search results
- Related posts by searching post tags of single post as terms
- Including categories in search results
- How set featured posts using checkbox in post edit screen?
- WP_Query: Why is sticky post not first item in loop?
- Display all posts from specific categories on a page
- Skip post in loop and mixin later
- How do I reorder (pop and push) items from WP_Query?
- How to exclude latest x posts from a paginated query?
- Display content from a specific category
- Reverse chronology of post listing
- how to display full post with pagination on home page
- Search not working with title and content
- This AJAX Code Doesn’t Work – Looking for elegant solution
- How to use alternate post layout at key points in post loop?
- Showing random content / pictures from earlier posts in a sticky post?
- Pagination not working on custom query
- Double count view in archive.php
- Group posts by year in loop
- Different style for most recent article
- Loop through all product posts?
- Count search results in heading
- Display number of posts via adress bar?
- Tags to Post-ID mysql query. Tag Search
- get_next_post() and get_previous_post() return wrong posts
- Converting a dynamic piece of code using WordPress Loop into a static one using Post ID
- Display post from current category and same tag?
- Inserting custom data to the_post() during loop
- Display post category in foreach loop with category link
- Displaying Latest Posts on a Page
- Display all posts that were published before full post on single.php
- Two loops, one AJAX loop, exclude posts in first loop from second loop, loops are in different files
- Posts and Attachments with “Published” status in Search
- Get Image tag from content of post
- List authors with the last post title and order by last post date
- How to make the first post in the loop be styled like a “new / featured” post?
- “Right Way” to make custom Loop respect reading settings inside admin panel?
- How to setup a query to output posts by groups of five?
- Only display sticky post or latest post in custom loop
- How to order posts in an arbitrary order?
- How to make a sum of all posts displayed in a loop
- why does wordpress ignore the post args?
- First x post with another template then the others
- Loop doesn’t show title of second post and posts thereafter
- Grid post page on WordPress with Bootstrap, the_excerpt(); Problem
- Loop parent terms {display posts} AND loop child terms {display posts}
- How to add a class to each individual post?
- add bootstrap post slider with tabs
- How to get posts published on the latest date?
- How can I remove the first two words and shorten get_the_title()
- Page and post loop same template
- ACF to select posts not displaying on blog page
- Querying another post category to match current post and display in loop
- How to display posts on custom page without declaring a posts page in reading settings?
- how to handle the loop using filling bootstrap grid structure?
- WordPress loop not working on static front page
- Display specific posts on home page
- The loop starting at a certain ID
- Loop not showing first post
- posts going to 2 pages/categories only show up in 1
- Custom Post Type Single Loop Outputting Wrong Post
- Get current taxonomy and display query accordingly
- I want to add another search box on posts page in dashboard
- Showing Posts if non are found
- How to show posts in grid style on search result page?
- Redirecting wordpress search query to archive page
- How to create custom search form function including post “tags”
- Multiple post in One Loop in wordpress
- Display specific posts based on an ID of another post
- Diffrent layout for posts [duplicate]
- Remove pagination if search returns empty
- How to distinguish pages created by woocommerce?
- Moved a website and excerpts don’t work for old posts
- How to get value of a selected option from select tag and use it in WP_query to filter posts?
- how to call recent post content in a loop ( only the content before read more tag)
- Show post excerpt
- Show author bio box
- Use special template for the first post in the loop
- Find post tags words in post content and link them to tag URLs
- Can the_post_navigation() be outside of the loop?
- WordPress infinite post cycle problem
- How to get all posts in gallery post format template
- Show Posts By Custom Field
- List of authors posts minus very latest
- show latest authors blog post
- Post gallery as carousel
- Showing content from WordPress ruins page CSS using WP_Query, without, content does not show
- Add something after all sticky posts in The Loop
- Customize search results to include custom posts and display in a specific template page
- Why I obtain this WP_Query strange behavior trying to select posts having a specific tag?
- Display Post by menu order
- Getting rid of the blog page entirely
- Custom Post Title as search term
- Is there a way to separate wordpress titles from their posts?
- adding custom meta as well as looping through posts
- Redirecting posts in WordPress to a specific page
- ‘posts_per_page’ => ’10’ does not show any post
- When and how will php code in a user made WordPress page be executed?
- Query wordpress posts on static page