What I want to do is get the ID's of all posts inside a custom post type. I'm using this code, however it seems to be stuck in an infinite loop.
$query = new WP_Query(array('post_type' => 'rdv-events', 'posts_per_page' => -1));
while ($query->have_posts()) {
$values = get_post_custom();
print_r($values);
}
wp_reset_postdata();
People place a shortcode on the site and then I want to use this to loop through some events and then echo then out. Maybe not important, but it was worth mentioning :)
Can anyone help me out? Thanks!!