Tagged Questions
1
vote
1answer
1k views
get all posts ID from a category
Problem: I need to get an array of ID's of posts from a given category If the category have any posts. This is to be used on a plugin options page.
So far I have:
$posts = ...
0
votes
1answer
408 views
get_posts by id not working
I have the following code:
global $post;
$current_post = $post->ID;
$array=range(1,$current_post);
$posts = get_posts('numberposts=5&post__in=' . $array . '&category='. ...
0
votes
1answer
91 views
Why would get_posts be ignoring posts with 2-digit ids?
I'm using this code to list child pages of the current page and similar code to get child pages of all ancestors to use in a sidebar contextual hierarchical nav menu:
$pageset = ...