I need help with this one. What I want to do is to display specific posts of the custom post type. Everything working fine, just I can't display more than 1(one) post. doesn't matter how much posts I select it always return to me just one. Here is a full code
<?php
$post_objects = get_sub_field('choose_blocks');
$string = "";
if( $post_objects ): ?>
<?php foreach( $post_objects as $post_object):
$post_id = $post_object->ID;
$string .= $post_id.',';
endforeach; ?>
<?php wp_reset_postdata(); // IMPORTANT - reset the $post object so the rest of the page works correctly ?>
<?php endif; ?>
<?php $string = rtrim($string, ','); ?>
<?php
$args = array(
'post_type'=>'presentations',
'post_status'=>'publish',
'post__in' => array( $string )
);
?>
<?php // the query
$all_presentations = new WP_Query($args); ?>
<?php if ( $all_presentations->have_posts() ) : ?>
<?php while ( $all_presentations->have_posts() ) : $all_presentations->the_post(); ?>
<?php get_template_part( 'includes/content', get_post_format() ); ?>
<?php endwhile; ?>
<!-- end of the loop -->
<?php wp_reset_postdata(); ?>
<?php else : ?>
<!-- do nothing -->
<?php endif; ?>
<?php endif; ?>