function NextAndPreviousPageLinks() { ?> <div class="post-navigation"> <hr /> <?php posts_nav_link('', 'Newer Posts', 'Older Posts'); ?> </div> <?php }
function next_previous_div() { ob_start(); posts_nav_link(); $links = ob_get_clean(); if (strlen($links) > 0) { echo '<div class="float post" style="text-align:center">'; echo posts_nav_link(); echo '</div><!-- end post-->'; } }
/** * The Shortcode */ function ebor_faq_shortcode($atts) { extract(shortcode_atts(array('pppage' => '8', 'filter' => 'all', 'part' => 'excerpt'), $atts)); $query_args = array('post_type' => 'faq', 'posts_per_page' => $pppage); if (!($filter == 'all')) { if (function_exists('icl_object_id')) { $filter = (int) icl_object_id($filter, 'faq_category', true); } $query_args['tax_query'] = array(array('taxonomy' => 'faq_category', 'field' => 'id', 'terms' => $filter)); } $block_query = new WP_Query($query_args); ob_start(); ?> <div class="row"> <?php if ($block_query->have_posts()) { while ($block_query->have_posts()) { $block_query->the_post(); /** * Get blog posts by blog layout. */ get_template_part('loop/content-faq', $part); } } else { /** * Display no posts message if none are found. */ get_template_part('loop/content', 'none'); } ?> </div> <?php /** * Post pagination, use ebor_pagination() first and fall back to default */ echo function_exists('ebor_pagination') ? ebor_pagination() : posts_nav_link(); ?> <?php $output = ob_get_contents(); ob_end_clean(); return $output; }
function theme_pagination($pages = '', $range = 1, $style = false) { $showitems = 2; global $paged; if (empty($paged)) { $paged = 1; } if ($pages == '') { global $wp_query; $pages = $wp_query->max_num_pages; if (!$pages) { $pages = 1; } } if (1 != $pages) { echo '<aside class="pagination ' . ($style ? $style : "") . '"><ul>'; if ($paged > 1 && $showitems < $pages) { echo '<li class="prev"><a href="' . get_pagenum_link($paged - 1) . '">' . ($style == 'style2' ? __('PREV', THB_THEME_NAME) : __('<i class="icon-budicon-439"></i>', THB_THEME_NAME)) . '</a></li>'; } for ($i = 1; $i <= $pages; $i++) { if (1 != $pages && (!($i >= $paged + $range + 1 || $i <= $paged - $range - 1) || $pages <= $showitems)) { echo $paged == $i ? "<li><span class='current'>" . $i . "</span></li>" : "<li class='pages " . ($i == 1 ? 'first' : '') . "'><a href='" . get_pagenum_link($i) . "'>" . $i . "</a></li>"; } } if ($paged < $pages && $showitems < $pages) { echo '<li class="next"><a href="' . get_pagenum_link($paged + 1) . '">' . ($style == 'style2' ? __('NEXT', THB_THEME_NAME) : __('<i class="icon-budicon-447"></i>', THB_THEME_NAME)) . '</a></li>'; } // echo '</ul><div class="six mobile-two columns"><span class="pages">'.$paged.' of '.$pages.'</span></div></aside>'; } if (1 == 2) { paginate_links(); posts_nav_link(); next_posts_link(); previous_posts_link(); } }
function theme_pagination($pages = '', $range = 1, $style = false) { $showitems = 2; global $paged; if (empty($paged)) { $paged = 1; } if ($pages == '') { global $wp_query; $pages = $wp_query->max_num_pages; if (!$pages) { $pages = 1; } } if (1 != $pages) { echo '<aside class="pagination ' . ($style ? $style : "") . '">'; if ($paged > 1 && $showitems < $pages) { echo '<a href="' . get_pagenum_link($paged - 1) . '" class="prev page-numbers">' . __('<i class="fa fa-caret-left"></i> PREV', THB_THEME_NAME) . '</a>'; } for ($i = 1; $i <= $pages; $i++) { if (1 != $pages && (!($i >= $paged + $range + 1 || $i <= $paged - $range - 1) || $pages <= $showitems)) { echo $paged == $i ? "<span class='page-numbers current'>" . $i . "</span></li>" : "<a href='" . get_pagenum_link($i) . "' class='page-numbers'>" . $i . "</a>"; } } if ($paged < $pages && $showitems < $pages) { echo '<a href="' . get_pagenum_link($paged + 1) . '" class="next page-numbers"><span>' . __('NEXT <i class="fa fa-caret-right"></i>', THB_THEME_NAME) . '</span></a>'; } echo '</aside>'; } if (1 == 2) { paginate_links(); posts_nav_link(); next_posts_link(); previous_posts_link(); } }
} ?> <?php if (function_exists('wp_pagenavi')) { ?> <?php wp_pagenavi(); ?> <?php } else { ?> <div class="post-navigation"><p><?php posts_nav_link('∞', '«« Previous Posts', 'Older Posts »»'); ?> </p></div> <?php } ?> </section><!-- end #post-content --> <?php get_sidebar(); ?> </div><!-- end .sixteen columns --> </div><!-- end .container -->
while (have_posts()) { the_post(); /** * Get blog posts by blog layout. */ get_template_part('loop/content', 'post'); } } else { /** * Display no posts message if none are found. */ get_template_part('loop/content', 'none'); } ?> </div> <?php /** * Post pagination, use ebor_pagination() first and fall back to default */ echo function_exists('ebor_pagination') ? ebor_pagination() : posts_nav_link(); ?> </div> <?php get_sidebar(); ?> </div>
</div> <?php } ?> <div class="navigation"> <?php posts_nav_link('', '', '« Previous Entries'); ?> <?php posts_nav_link('', 'Next Entries »', ''); ?> </div> <?php } else { ?> <h2>Not Found</h2> <p><?php _e("Sorry, but you are looking for something that isn't here."); ?> </p> <?php
?> --> <?php } } else { ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?> </p><?php } ?> <?php posts_nav_link(' — ', __('« go back'), __('keep looking »')); ?> </div> <?php include TEMPLATEPATH . "/l_sidebar.php"; ?> <?php include TEMPLATEPATH . "/r_sidebar.php"; ?> </div> <!-- The main column ends -->
</div> <p class="postfeedback"> <?php edit_post_link(__('Edit'), ' {', '}'); ?> </p> </div> <?php } ?> <?php posts_nav_link(' · ', __('Next entries »'), __('« Previous entries')); ?> <?php } else { ?> <h2><?php _e('Not Found'); ?> </h2> <p><?php _e('Sorry, but the page you requested cannot be found.'); ?> </p>
//вывод ссылки ?> "><?php the_post_thumbnail(); //вывод миниатюры ?> </a> </div> <?php } ?> <?php } else { ?> <?php } ?> <div class="clear"><?php posts_nav_link('<span> - </span>'); //постраничная навигация ?> </div><!-- сбросить оптикание .clear{clear:both; --> </div> <?php get_sidebar(); ?> </div> </div> <?php get_footer();
?> </ul> <?php } else { ?> <div class="no-posts"> <h3><?php _e('No posts found!', 'p2'); ?> </h3> </div> <?php } ?> <div class="navigation"> <p><?php posts_nav_link(' | ', __('← Newer Posts', 'p2'), __('Older Posts →', 'p2')); ?> </p> </div> </div> <!-- main --> </div> <!-- sleeve --> <?php get_footer();
if (is_single()) { wp_link_pages(); } ?> <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?> </div> </div> </div> <?php comments_template(); // Get wp-comments.php template ?> <?php } } ?> <div class="alignleft"><?php posts_nav_link('', __('« Newer Posts'), ''); ?> </div> <div class="alignright"><?php posts_nav_link('', '', __('Older Posts »')); ?> </div> </div> <?php get_footer();
<?php the_excerpt(); ?> <p><a href="<?php echo get_permalink(); ?> ">Read More →</a></p><div class="clear"></div><div class="sep"></div> <?php } ?> <?php } else { ?> <p><?php _e("Sorry, no posts matched your criteria.", "arclite"); ?> </p> <?php } ?> <div class="navigation"> <div class="alignleft"><?php posts_nav_link('$sep', $prelabel, $nextlabel); ?> </div> </div> </div> <?php get_sidebar(); get_footer();
?> </a></h3> <?php the_excerpt(); ?> </li> <?php } ?> </ol> </article> <nav> <p><?php posts_nav_link(' • '); ?> </p> </nav> <?php } else { ?> <article> <h1>Not Found</h1> <p>Sorry, but the requested resource was not found on this site.</p> <?php get_search_form(); ?> </article>
?> <?php the_tags(' | ' . __('Tags: '), ', '); ?> </p> </div> </div> </div> <?php } ?> <p align="center"><?php posts_nav_link(' - ', __('« Newer Posts'), __('Older Posts »')); ?> </p> <?php } else { ?> <div class="title"> <h2><?php _e('Not Found'); ?> </h2> </div> <p class="center"><?php _e('Sorry, but you are looking for something that isn\'t here.'); ?>
?> <?php } else { ?> <p>Sorry, no posts match your criteria.</p> <?php } ?> <!-- postsNavWrapper --> <div class="postsNavWrapper" align="center"> <div class="postsNav buttonContainer"> <?php posts_nav_link(' ', '<span></span> Newer Posts', 'Older Posts <span></span>'); ?> </div> </div><!-- /postsNav --> </div><!-- #content --> <div id="sidebar"><?php dynamic_sidebar('sidebar-news'); ?> </div> </div><!-- .row --> </div><!--#right --> </div><!-- .interior-content --> </div><!--.container-fluid -->
<?php get_header(); ?> <div class="row"> <main role="main" class="main col-sm-12 archive-tips"> <h1 class="page-title"><?php single_cat_title(); ?> </h1><?php if (have_posts()) { while (have_posts()) { the_post(); ?> <article class="stories-tip"> <h3><?php the_title(); ?> </h3><?php the_content(); ?> ?> </article><?php } posts_nav_link('--', 'Previous', 'Next'); } ?> </main> </div><?php get_footer();
<?php the_content(); ?> <?php } ?> </section> </article> </div> <?php } ?> <div class="pagination"> <?php posts_nav_link(' ', 'Go Forward In Time', 'Go Back in Time'); ?> </div> </div> <?php } else { ?> <article id="post-not-found" class="hentry cf"> <header class="article-header"> <h1><?php _e('Oops, Post Not Found!', 'bonestheme'); ?> </h1> </header>
get_header(); the_post(); ?> <h1 class="archive-header"><?php printf(__('Posts By %s', 'origami'), get_the_author_meta('display_name')); ?> </h1> <div><?php rewind_posts(); get_template_part('loop', 'index'); ?> </div> <div id="posts-nav"> <?php if (function_exists('wp_pagenavi')) { wp_pagenavi(); ?> <?php } else { posts_nav_link('', 'newer entries', 'older entries'); ?> <?php } ?> </div> <?php get_footer();
/images/icons/top.png" border="0" alt="TOP" title="<?php _e('To the top', 'techozoic'); ?> " /></a> </div> <?php } ?> </div> <?php } ?> <?php } ?> <div class="navigation"> <div class="alignleft"><?php posts_nav_link(' ', ' ', __('« Older Entries', 'techozoic')); ?> </div> <div class="alignright"><?php posts_nav_link(' ', __('Newer Entries »', 'techozoic'), ' '); ?> </div> </div> </div> </div> <?php get_footer();
?> <?php edit_post_link('编辑', '', ' | '); ?> <?php comments_popup_link('评论 »', '1 评论 »', '% 评论 »', '', '<!--评论关闭-->'); ?> </p> </div> </div> <?php } ?> <div class="navigation"> <?php posts_nav_link(' ', '<span class="nav_prev">«上一页</span>', '<span class="nav_next">下一页»</span>'); ?> </div> <?php } else { ?> <div class="story"> <h2>什么也没有..</h2> </div> <?php } ?> </div> <?php get_sidebar(); ?>
</div> <!-- End each blog post --> <?php } } ?> </div> </div> </div> <!-- End main content --> <?php if (function_exists("wpapi_pagination")) { wpapi_pagination($wp_query->max_num_pages); } else { ?> <div class="pagination"><p><?php posts_nav_link(' '); ?> </p></div> <?php } ?> </div> <?php get_footer();
$us_thumbnail_size = 'blog-grid'; get_template_part('templates/blog_single_post'); } ?> </div> </div> <?php if (function_exists('us_pagination') and $pagination = us_pagination()) { ?> <div class="w-blog-pagination"> <div class="g-pagination"> <?php echo $pagination; ?> </div> </div> <?php } else { ?> <div class="w-blog-pagination"> <div class="g-pagination"> <?php posts_nav_link(' ', '<span class="g-pagination-item to_prev">« Prev</span>', '<span class="g-pagination-item to_next">Next »</span>'); ?> </div> </div> <?php } wp_reset_postdata(); $wp_query = $temp;
the_content(__('[Read more]')); ?> <div style="clear:both;"></div> <div class="postmeta2"> Tagged: <?php the_tags(''); ?> </div> <?php } ?> <p><?php posts_nav_link(); ?> </p> </div> </div> <?php include TEMPLATEPATH . "/sidebar.php"; ?> </div> <!-- The main column ends -->
</p> </div> <hr> <?php } ?> <div> <div><?php posts_nav_link('', '', __('Previous', '')); ?> | <?php posts_nav_link('', __('Next', ''), ''); ?> </div> </div> <?php } else { ?> <h2 class="center"><?php _e('No content found.'); ?> </h2> <p class="center"><?php _e("Would you care to search the site?"); ?>
<h5><?php comments_popup_link(__('No comments'), __('1 Comment'), __('% Comments')); ?> </h5> </div> </div> <?php } } else { ?> <div class="page"> <h2>Page not found!</h2> <div class="page-content"> <p><?php _e('Please use the search form from the top of this page.'); ?> </p> </div> </div> <?php } ?> <div id="navigation"><?php posts_nav_link(' — ', __('« Previous Page'), __('Next Page »')); ?> </div> <?php get_footer();
<section class="posts"> <?php if (get_search_query()) { echo '<p>results for ', get_search_query(), '</p>'; } while (have_posts()) { the_post(); echo '<div class="post" id="', the_ID(), '">'; echo '<header>'; echo '<h2><a href="' . get_permalink() . '">', the_title(), '</a></h2>'; echo '<p class="date">'; the_time(get_option('date_format')); echo '</p>'; echo '</header>'; if (has_post_thumbnail()) { echo '<div class="post-hero">'; echo get_the_post_thumbnail(get_the_ID(), 'thumbnail'); echo '</div>'; } the_excerpt(); echo '</div>'; } echo '<section class="navigation"><p>', posts_nav_link(), '</p></section>'; ?> </section>
?> <div class="rightside <?php if (ale_get_option('rightsidebargallery') == 1) { echo 'centerside'; } ?> "> <div class="margincontentbox"> <header class="page-title"> <h2 class="a"><?php _e('Gallery', 'aletheme'); ?> </h2> <div class="toppagination"> <?php posts_nav_link(' / ', __('NEWER'), __('OLDER')); ?> </div> </header> <div class="content cf"> <div class="boxwithgalleries"> <div class="galleryitems"> <?php if (have_posts()) { while (have_posts()) { the_post(); ?> <div class="gallbox"> <figure> <?php echo get_the_post_thumbnail($post->ID, 'gallery-tumba');
<?php if ($wp_query->max_num_pages > 1) { ?> <div class="chipboxm1 chipstyle1"> <div class="chipboxm1data"> <?php if (function_exists('wp_pagenavi')) { ?> <div><?php wp_pagenavi(); ?> </div> <?php } else { ?> <div><?php posts_nav_link('', '« Previous Page', 'Next Page »'); ?> </div> <?php } ?> </div> </div> <?php }