How to get post attachments in gallery post format template

i had sort out this with function get_post_gallery

find the answer

if ( ! function_exists( 'flexi_gallery_slideshow' ) ) :
/**
* Display an optional post read more link
*
*/ 
function flexi_gallery_slideshow( ) {
echo '<ul class="bxslider">';
if ( get_post_gallery() ) :
        $gallery = get_post_gallery( get_the_ID(), false );

        /* Loop through all the image and output them one by one */
        foreach( $gallery['src'] as $src ) : ?>
          <li> <img src="https://wordpress.stackexchange.com/questions/227935/<?php echo $src; ?>" class="gallery-slider" alt="Gallery image" /> </li>
          <?php
        endforeach;
    endif;
echo '</ul>'  ;     
}
endif;

Leave a Comment

error code: 523