Getting postS with meta-values
-
Hi,
I’m trying to get some of my posts with their meta-value (or some of their meta-value).
I just wonder if some knew a way to do that without custom DB query and without doing a query for all posts and them a query for every post to get meta values.
Exemple:
I got 2 boolean meta value on post :
1) If post is a job (is_job)
2) if the post is a “empty job” (empty_job)So I make a first filter to get only the “is_job == 1” filtered by the post_name ASC and I want to get the “empty_job” value for every post. That way I’ll be able to make a foreach of my “posts” and print different stuff for every posts depending on whether “empty_job” is set to 1 or 0
- The topic ‘Getting postS with meta-values’ is closed to new replies.