Hi,
I have added custom fields to my posts which are unrelated to The Events Calendar using the ACF plugin. I have added fields “Author” and “Source” to my posts. I now need to include these custom fields in the standard WP search. I have tried a couple of plugins and hardcoding this functionality in functions.php to add the fields to the search.
Every method I have tried — using plugins or code — causes the calendar widget on the side bar to display error messages when I perform a search:
WordPress database error: [Not unique table/alias: 'wp_postmeta']
SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.ID FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) INNER JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id ) LEFT JOIN
Here are a couple of examples I have tried:
Search WordPress by Custom Fields without a Plugin
Relevanssi – A Better Search
Great software!
Thanks for your help…