Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="iPad">
- <?php
- $fotorama_query = new WP_Query( 'category_name=novetly' );
- if ( $fotorama_query->have_posts() ) {
- while ( $fotorama_query->have_posts() ) {
- $fotorama_query->the_post();
- the_post_thumbnail('iPad');
- }
- }
- wp_reset_postdata();
- ?>
- <div id="html">
- <?php
- $fotorama_query = new WP_Query( 'category_name=novetly' );
- if ( $fotorama_query->have_posts() ) {
- while ( $fotorama_query->have_posts() ) {
- $fotorama_query->the_post();
- ?>
- <div class="b-slide">
- <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
- </div>
- <?php
- }
- }
- wp_reset_postdata();
- ?>
- </div>
- </div>
- <script type="text/javascript">
- var fotorama = $('.iPad');
- var i, timeout;
- var time = 10000;
- var html = $('.b-slide', '#html');
- fotorama.fotorama({
- width: 374,
- height: 280,
- cropToFit: true,
- thumbsPreview: false,
- pseudoClickLoop: true,
- // onShowImg: function(data){
- // clearTimeout(timeout);
- // timeout = setTimeout(function(){
- // fotorama.trigger('showimg', data.index+1);
- // }, time);
- // },
- html: {
- <?php
- $b_slide = -1;
- $fotorama_query = new WP_Query( 'category_name=novetly' );
- if ( $fotorama_query->have_posts() ) {
- while ( $fotorama_query->have_posts() ) {
- $fotorama_query->the_post();
- $b_slide = $b_slide + 1;
- echo $b_slide . ' : html.eq(' . $b_slide . '),';
- }
- }
- wp_reset_postdata();
- ?>
- }
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement