What I’m trying to do should be really simple, yet I’ve spent the whole morning trawling through the forums with no joy! I’ve created an array:
<?php $latest_category_posts = new WP_Query(array(‘category__in’=>array(‘7’), ‘tag__not_in’=>array(‘11,13,15’), ‘post__not_in’=>array($mypost), ‘showposts’=>’4’)); ?>
which obviously holds numerous elements. How can I further refine my varible $latest_category_posts so that it only holds the post ids, i.e $latest_category_posts = $latest_category_posts(with just the ids!!)?
It seems as though it should be really easy yet I can’t figure it out at all!!
Any help will be greatly appreciated! Cheers.
- The topic ‘How to extract post ids from an array?’ is closed to new replies.