Select category in custom query
I’m sure this question is asked alot, but I cannot figure it out, since all the different ways to query posts are confusing me..
I’m sure this question is asked alot, but I cannot figure it out, since all the different ways to query posts are confusing me..
So, for the thousands using WP as CMS, a typical approach is that of using the ‘A Static Page’ option from the Settings > Reading admin page.
I am trying to get post from a category ordered random, but making sure that the author does not repeat itself.
How can I show the amount of a comment per post outside the loop? I tried this in a function already:
In the recent wordpress.org article outlining the new Query Loop block, it says the “Inherit query from template” option allows you to “customize the query that the loop relies upon … WordPress will otherwise rely on the template being used to determine what posts appear”.
Quick question: I would like to retrieve some pages/posts with a meta value inside a range, eg) $min<$meta_value<$max
I’ve two category employee and full-time. If a post publish in both (employee and full-time) category then the post will show in his specific section. If post has only employee category, not full-time or has only full-time, not employee, then this post will not show in the post block.
I have many posts.
Some have meta data, with a key called “foo”.
I would like to display posts with a ‘year’ parameter. For example: to display posts from 2020, the shortcode should look like [archived-posts year=”2020″]. I have tried my code below but it’s not working. Maybe the ‘meta_value’ is not correct? Any help would be appreciate it.
I want to load 3 posts that have the same custom field value as the current post.
for example:
The current post has 3 custom fields:
color: black
background: red
lastname: doe
Now I want to load three posts with these custom fields:
first post: color:black
second post: background:red
third post: lastname:doe
these are my codes: