Search Results
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 |
get_posts() is a function for creating multiple loops. It retrieves a list of latest posts or posts matching criteria.
1
vote
1
answer
4k
views
How to count posts with specific arguments
I'm wondering how I can request the amount of posts by passing certain arguments (you could see this as part of a "query"). See the example below.
$args = [
"numberposts" => -1,
"post_type" …
1
vote
get_next_post() and get_previous_post() return wrong posts
The problem was that Wordpress uses these functions based on post_date ...
I did an import from an old CMS to Wordpress where I just added all posts within a loop. Some of the dates were a few second …
1
vote
1
answer
1k
views
get_next_post() and get_previous_post() return wrong posts
I’ve been trying to retrieve the next and previous post in one of my Wordpress templates. Please note that I want to get the full post object instead of just the pre-formatted links to the posts.
The …