Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 89206

"wp-query" ambiguously refers to one of two things. 1) WP_Query is a class native to WordPress which allows users to query the posts database using a number of criteria. 2) $wp_query is the global variable that holds the main query object prepared by WordPress based on a given request.

1 vote
Accepted

Get post with multiple meta keys and value

SOLUTION The Solution Accepted below worked, however, I wanted to know how is it working? This is how it's working SELECT * FROM wp_posts p, wp_postmeta m1, wp_postmeta m2 WHERE p.ID = m1.post_ …
Sheraz Ahmed's user avatar
11 votes
6 answers
38k views

Get post with multiple meta keys and value

I am trying to fetch a post based on the following meta keys. post_code with 432C location with XYZ Both belong to a CPT. I'm trying to fetch the Post with both these meta_values. I Don't Want an …
Sheraz Ahmed's user avatar