Advertisement
apurba

pagination

May 27th, 2015
341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.33 KB | None | 0 0
  1.   <?php
  2.               $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
  3.               $loop = new WP_Query( array(
  4.               'post_type' => 'movie',
  5.               'posts_per_page' => 6,
  6.               'paged'=>$paged
  7.               ) ); ?>
  8.            
  9.                   <div class="row">
  10.                     <?php if ($loop-> have_posts() ) : while ( $loop->have_posts() ) : $loop->the_post();?>
  11.                      <div class="browse-movie-wrap col-xs-10 col-sm-4 col-md-5 col-lg-4">
  12.                         <a href="<?php the_permalink(); ?>" class="browse-movie-link">
  13.                            <figure>
  14.                                  <?php if(has_post_thumbnail()):?>
  15.  
  16.  
  17.                                  <?php
  18.                                  the_post_thumbnail( '', array( 'class' => 'img-responsive' ));
  19.  
  20.                                  else:
  21.                                  ?>  
  22.                                  <img class="img-responsive" src="<?php echo  THEMEROOT.'/images/default.jpg' ?>" alt="<?php the_title(); ?>" />
  23.  
  24.                               <?php endif; ?>
  25.  
  26.                               <figcaption class="hidden-xs hidden-sm">
  27.                                <?php   if ($taxonomy_name=get_tax_name($post->ID,'rating')):?>
  28.                                       <i class="fa fa-star"></i>
  29.                                    <h4 class="rating">
  30.  
  31.                                     <?php echo $taxonomy_name.'/ 10';  ?>
  32.                                  
  33.                                    </h4>
  34.                                 <?php endif; ?>
  35.                                    <h4>
  36.                                    <?php
  37.  
  38.                                       echo get_tax_name($post->ID, 'genre' , $sep='<br/>')
  39.  
  40.                                    ?>
  41.  
  42.                                    </h4>
  43.                                    
  44.                                    <span class="button-green-download-big">বিস্তারিত দেখুন</span>
  45.                               </figcaption>
  46.                            </figure>
  47.                         </a>
  48.                         <div class="browse-movie-bottom">
  49.                            <a href="movie/the-spongebob-movie-sponge-out-of-water-2015.htm" class="browse-movie-title">The SpongeBob Movie: Sponge Out of Water</a>
  50.                            <div class="browse-movie-year">2015</div>
  51.                            <div class="browse-movie-tags">   <a href="torrent/download/The Spongebob Movie Sponge Out Of Water (2015) [720p] YIFY - YTS.torrent">720p</a>    <a href="torrent/download/The Spongebob Movie Sponge Out Of Water (2015) [1080p] YIFY - YTS.torrent">1080p</a>   </div>
  52.                         </div>
  53.                      </div>
  54.                      <?php endwhile; ?>
  55.  
  56.                  
  57.                      <?php the_posts_pagination( array(
  58.                     'prev_text'          => __( 'Previous page' ),
  59.                     'next_text'          => __( 'Next page' ),
  60.                     'screen_reader_text' => __( ' ' ),
  61.                     'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page' ) . ' </span>',
  62.                    ) ); ?>
  63.                    
  64.                      
  65.                      <?php else: ?>
  66.                      
  67.                      <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement