get_posts won't filter by post_type
-
I’ve looked for bugs and support issues. The closest issue I found was this post here.
I’m working with custom xml-rpc methods and using get_posts as follows:
// construct query $params = array( 'post_type' => 'page', 'numberposts' => $numberposts, 'offset' => $offset ); $posts = get_posts($params);
The returned value is an array of both posts and pages, though the other parameters work correctly. The resultant value of $posts is unchanged if I switch ‘post_type’ to => ‘post’ or omit it entirely (function reference claims to default to ‘post’).
I’ve also tried a single string of args, but no difference:
get_posts('post_type=post');
If there’s no solutions I’ll
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘get_posts won't filter by post_type’ is closed to new replies.