Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* discussion: http://themefuse.com/forum/freshfolio-wp/adding-pagination */
- ?>
- <?php else: ?>
- <li><p><?php _e('Sorry, no posts matched your criteria.', 'tfuse') ?></p></li>
- <?php endif; ?>
- <?php /*start pagination mod*/
- global $wp_query;
- $total = $wp_query->max_num_pages;
- if($total > 1) :
- if(!$current_page = $paged){
- $current_page = 1;
- }
- $haveperm = get_option('permalink_structure');
- $format = empty($haveperm) ? '&page=%#%' : 'page/%#%/';
- ?>
- <li>
- <div class="slide_image"><div class="border_image">
- <?php if ($total > $current_page){
- next_posts_link('<img src="'.get_bloginfo('template_directory').'/images/next_page_home.png" />','');
- }else{
- previous_posts_link('<img src="'.get_bloginfo('template_directory').'/images/prev_page_home.png" />','');
- }?>
- </div></div>
- <div class="slide_content">
- <div class="slide_title"><h2><?php next_posts_link('Next Page'); ?></h2></div>
- <div class="slide_meta">
- <?php echo paginate_links(array(
- 'base' => get_pagenum_link(1) . '%_%',
- 'format' => $format,
- 'current' => $current_page,
- 'total' => $total,
- 'mid_size' => 4,
- 'type' => 'plain'
- ));
- ?>
- </div>
- </div>
- <div class="scroll_navi"><a href="#" class="scroll_prev"><?php _e('Prev', 'tfuse') ?></a> <a href="#" class="scroll_next"><?php _e('Next', 'tfuse') ?></a></div>
- </li>
- <?php endif; /*end pagination mod*/?>
- </ul>
- <div class="clear"></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement