get_posts WILL NOT WORK for CHILDREN! DAAGH!
-
It’s a simple thing, really – I want to use get_posts to retrieve posts from a category that is a child of another category. When I use any of the main category IDs, it works – for some reason, children categories don’t work.
Am I crazy?
<?php
$posts = get_posts(‘numberposts=2&category=16’);
foreach ($posts as $post) : start_wp(); ?>
<– do stuff –>
<?php endforeach; ?>here is the error:
Warning: Invalid argument supplied for foreach()ALSO – the_title only works for the first post!!! DAAGH!
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘get_posts WILL NOT WORK for CHILDREN! DAAGH!’ is closed to new replies.