Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //SHORTCODE [coverflow_vslides]
- function vslides_func( $atts ){
- ob_start();
- echo '<div id="coverflow-flipster">';
- echo '<ul>';
- $args = array( 'post_type' => 'vidsliderchild', 'posts_per_page' => -1 );
- $loop = new WP_Query( $args );
- while ( $loop->have_posts() ) : $loop->the_post();
- $id = get_the_ID();
- echo '<li id="flip-content" class="">';
- echo '<div data-toggle="modal" data-target="#vidmodals' . $id . '" class="togglediv">';
- echo '</div>';
- echo types_render_field( "slider-image", array( "size" => "full" ));
- echo '<div class="flipnamedetails">';
- echo '<p class="flipname">';
- echo types_render_field( "name");
- echo '</p>';
- echo '<p class="flipdetails">';
- echo types_render_field( "details");
- echo '</p>';
- echo '</div>';
- echo '</li>';
- endwhile;
- echo '</ul>';
- echo '</div>';
- while ( $loop->have_posts() ) : $loop->the_post();
- $id = get_the_ID();
- ?>
- <div id="vidmodals<?php echo $id; ?>" class="modal fade" role="dialog">
- <div class="modal-dialog">
- <!-- Modal content-->
- <div class="modal-content">
- <button type="button" class="close" data-dismiss="modal">×</button>
- <div class="modal-body">
- <?php echo types_render_field( "lightbox-content"); ?>
- </div>
- </div>
- </div>
- </div>
- <?php
- endwhile;
- return ob_get_clean();
- }
- add_shortcode( 'coverflow_vslides', 'vslides_func' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement