Thanks I could make it happen:
<?php
$args = array(
'post__in' => $wpp_query_ids
);
// The Query
$the_query = new WP_Query( $args );
?>
cheers 🙂
I tried this:
$wpp_query = new WPP_Query( array('range' => 'weekly', 'post_type' => 'post', 'order_by' => 'views', 'limit' => 40) );
$wpp_query_ids = array_map(function($wppost){return (int)$wppost->id;}, $wpp_query->get_posts());
var_dump( $wpp_query->get_posts() );
Output:
array(2) { [0]=> object(stdClass)#4070 (1) { ["id"]=> string(1) "1" } [1]=> object(stdClass)#4129 (1) { ["id"]=> string(1) "5" } }
I still stuck at outputting IDs only out of the array. Any help is much appreciated