Skip to main content
8 events
when toggle format what by license comment
Feb 8, 2018 at 18:31 comment added Andy W What you have is an "AND" query: 'keywords' LIKE $name AND search_term LIKE $name AND 'category' LIKE $place. What you want is a combination "AND" and "OR" query: ('keywords' LIKE $name OR search_term LIKE $name) AND 'category' LIKE $place. See this answer: wordpress.stackexchange.com/a/123193/129019
Feb 8, 2018 at 14:06 comment added Amirition @iceable Yes you are right, $meta_query_args is extra but it still look for the posts with categories exactly the same as $_place.
Feb 8, 2018 at 14:06 comment added Amirition @jacob-peattie I edited the question with 'similar' definition.
Feb 8, 2018 at 14:03 history edited Amirition CC BY-SA 3.0
added 90 characters in body
Feb 8, 2018 at 13:50 comment added Iceable What is the $meta_query_args for? The current code searches for posts that have $_name in a custom field named keywords, in addition to matching the $_name search term ('s' argument) and being in the $_place category ('tax_query' arg).
Feb 8, 2018 at 13:49 comment added Jacob Peattie Define 'similar'.
Feb 8, 2018 at 13:35 review First posts
Feb 8, 2018 at 15:21
Feb 8, 2018 at 13:33 history asked Amirition CC BY-SA 3.0