Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- global $post;
- $slider_post_count = 5;
- $main_slider_cat_id = 3;
- $args = array( 'posts_per_page' => $slider_post_count, 'post_type'=> 'post', 'orderby' => 'menu_order', 'order' => 'ASC', 'category' => 'main_slider_cat_id' );
- $myposts = get_posts( $args );
- foreach( $myposts as $post ) : setup_postdata($post); ?>
- <?php
- $slider_effect_class= get_post_meta($post->ID, 'slider_effect_class', true);
- $data_slotamount= get_post_meta($post->ID, 'data_slotamount', true);
- $data_masterspeed= get_post_meta($post->ID, 'data_masterspeed', true);
- $main_slider_img = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'main_slider_img' );
- ?>
- <li data-transition="<?php echo $slider_effect_class; ?>" data-slotamount="<?php echo $data_slotamount;?>" data-masterspeed="<?php echo $data_masterspeed; ?>">
- <!-- THE MAIN IMAGE IN THE FIRST SLIDE -->
- <img alt="" src="<?php echo $main_slider_img[0]; ?>" />
- <?php the_content();?>
- </li>
- <?php endforeach; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement