本文整理汇总了PHP中get_posts_nav_link函数的典型用法代码示例。如果您正苦于以下问题:PHP get_posts_nav_link函数的具体用法?PHP get_posts_nav_link怎么用?PHP get_posts_nav_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_posts_nav_link函数的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: atticus_finch_display_nav
function atticus_finch_display_nav()
{
$atticus_finch_num_posts = wp_count_posts()->publish;
$atticus_finch_posts_per_page = get_option('posts_per_page ');
if ($atticus_finch_num_posts > $atticus_finch_posts_per_page) {
echo '<div id="posts-nav">' . get_posts_nav_link(' • ', '« Newer Posts', 'Older Posts;') . '</div>';
}
}
开发者ID:kjodle,项目名称:Atticus-Finch,代码行数:8,代码来源:template-tags.php
示例2: _get_arrow_pagination
private static function _get_arrow_pagination($data)
{
global $wp_query, $paged;
$old_query = clone $wp_query;
$query = Upfront_Posts_Model::spawn_query($data);
if (empty($query)) {
return '';
}
$wp_query = $query;
$paged = get_query_var('paged');
$pagination = get_posts_nav_link();
$wp_query = $old_query;
return $pagination;
}
开发者ID:sedici,项目名称:wpmu-istec,代码行数:14,代码来源:class_upfront_posts_posts_view.php
示例3: posts_nav_link
/**
* Display post pages link navigation for previous and next pages.
*
* @since 0.71
*
* @param string $sep Optional. Separator for posts navigation links.
* @param string $prelabel Optional. Label for previous pages.
* @param string $nxtlabel Optional Label for next pages.
*/
function posts_nav_link($sep = '', $prelabel = '', $nxtlabel = '')
{
$args = array_filter(compact('sep', 'prelabel', 'nxtlabel'));
echo get_posts_nav_link($args);
}
开发者ID:rizkafitri,项目名称:WordPress-1,代码行数:14,代码来源:link-template.php
示例4: if
<?php
/**
* Navigation Links Template
*
* This template is used to show your your next/previous post links on singular pages and
* the next/previous posts links on the home/posts page and archive pages. It also integrates
* with the WP PageNavi plugin if activated.
*
* @package Hybrid
* @subpackage Template
*/
?>
<?php if ( is_attachment() ) : ?>
<?php previous_post_link( '%link', '<span class="previous">' . __( '« Return to entry', 'hybrid' ) . '</span>' ); ?>
<?php elseif ( is_singular( 'post' ) ) : ?>
<?php previous_post_link( '%link', '<span class="previous">' . __( '« Previous', 'hybrid' ) . '</span>' ); ?>
<?php next_post_link( '%link', '<span class="next">' . __( 'Next »', 'hybrid' ) . '</span>' ); ?>
<?php elseif ( !is_singular() && function_exists( 'wp_pagenavi' ) ) : wp_pagenavi(); ?>
<?php elseif ( !is_singular() && $nav = get_posts_nav_link( array( 'sep' => '', 'prelabel' => '<span class="previous">' . __( '« Previous', 'hybrid' ) . '</span>', 'nxtlabel' => '<span class="next">' . __( 'Next »', 'hybrid' ) . '</span>' ) ) ) : ?>
<?php echo $nav; ?>
<?php endif; ?>
开发者ID:nerdfiles,项目名称:tbotw.org,代码行数:25,代码来源:navigation-links.php
示例5: elseif
<?php
} elseif (is_singular('post')) {
?>
<div class="loop-nav">
<?php
previous_post_link('<div class="previous">' . __('← %link', 'origin') . '</div>', '%title');
?>
<?php
next_post_link('<div class="next">' . __('%link', 'origin') . ' →</div>', '%title');
?>
</div><!-- .loop-nav -->
<?php
} elseif (!is_singular() && current_theme_supports('loop-pagination')) {
loop_pagination();
?>
<?php
} elseif (!is_singular() && ($nav = get_posts_nav_link(array('sep' => '', 'prelabel' => '<span class="previous">' . __('← Previous', 'origin') . '</span>', 'nxtlabel' => '<span class="next">' . __('Next →', 'origin') . '</span>')))) {
?>
<div class="loop-nav">
<?php
echo $nav;
?>
</div><!-- .loop-nav -->
<?php
}
开发者ID:ARTSAT,项目名称:artsat-jp-themes,代码行数:30,代码来源:loop-nav.php
示例6: get_header
<?php
get_header();
?>
<div><?php
get_template_part('loop', 'index');
?>
</div>
<?php
if (get_posts_nav_link()) {
?>
<div id="posts-nav">
<?php
posts_nav_link('', __('Newer Entries', 'origami'), __('Older Entries', 'origami'));
?>
</div>
<?php
}
?>
<?php
get_footer();
开发者ID:sudocoda,项目名称:mikelovescomics.com,代码行数:24,代码来源:index.php
示例7: product_taxonomy_list_theme
function product_taxonomy_list_theme($content)
{
//don't filter outside of the loop
if (!in_the_loop()) {
return $content;
}
$msgs = $this->get_setting('msg');
$content = do_shortcode($msgs['product_list']);
$content .= mp_list_products(false);
$content .= '<div id="mp_product_nav">' . get_posts_nav_link() . '</div>';
return $content;
}
开发者ID:hscale,项目名称:webento,代码行数:12,代码来源:marketpress.php
示例8: elseif
<?php
} elseif (is_singular('post')) {
?>
<div class="loop-nav">
<?php
previous_post_link('%link', '<span class="previous">' . __('<span class="meta-nav">←</span> Previous', hybrid_get_textdomain()) . '</span>');
?>
<?php
next_post_link('%link', '<span class="next">' . __('Next <span class="meta-nav">→</span>', hybrid_get_textdomain()) . '</span>');
?>
</div><!-- .loop-nav -->
<?php
} elseif (!is_singular() && current_theme_supports('loop-pagination')) {
loop_pagination(array('prev_text' => __('<span class="meta-nav">←</span> Previous', hybrid_get_textdomain()), 'next_text' => __('Next <span class="meta-nav">→</span>', hybrid_get_textdomain())));
?>
<?php
} elseif (!is_singular() && ($nav = get_posts_nav_link(array('sep' => '', 'prelabel' => '<span class="previous">' . __('<span class="meta-nav">←</span> Previous', hybrid_get_textdomain()) . '</span>', 'nxtlabel' => '<span class="next">' . __('Next →', hybrid_get_textdomain()) . '</span>')))) {
?>
<div class="loop-nav">
<?php
echo $nav;
?>
</div><!-- .loop-nav -->
<?php
}
开发者ID:rzb,项目名称:boletos2,代码行数:31,代码来源:loop-nav.php
示例9: elseif
<?php
} elseif (is_singular('post')) {
?>
<div class="loop-nav">
<?php
previous_post_link('%link', '<span class="previous">' . __('<span class="meta-nav">←</span> Previous', 'bearded') . '</span>');
?>
<?php
next_post_link('%link', '<span class="next">' . __('Next <span class="meta-nav">→</span>', 'bearded') . '</span>');
?>
</div><!-- .loop-nav -->
<?php
} elseif (!is_singular() && current_theme_supports('loop-pagination')) {
loop_pagination(array('prev_text' => __('Previous', 'bearded'), 'next_text' => __('Next', 'bearded')));
?>
<?php
} elseif (!is_singular() && ($nav = get_posts_nav_link(array('sep' => '', 'prelabel' => '<span class="previous">' . __('Previous', 'bearded') . '</span>', 'nxtlabel' => '<span class="next">' . __('Next', 'bearded') . '</span>')))) {
?>
<div class="loop-nav">
<?php
echo $nav;
?>
</div><!-- .loop-nav -->
<?php
}
开发者ID:jahir07,项目名称:bearded,代码行数:30,代码来源:loop-nav.php
示例10: previous_post_link
previous_post_link('%link', '<span class="previous">' . sprintf(__('<span class="meta-nav">←</span> Previous %s', 'socially-awkward'), $label) . '</span>');
?>
<?php
next_post_link('%link', '<span class="next">' . sprintf(__('Next %s <span class="meta-nav">→</span>', 'socially-awkward'), $label) . '</span>');
?>
</div><!-- .loop-nav -->
<?php
} elseif (is_attachment()) {
// If viewing a single attachment.
?>
<div class="loop-nav">
<?php
previous_post_link('%link', '<span class="previous">' . __('<span class="meta-nav">←</span> Return to entry', 'socially-awkward') . '</span>');
?>
</div><!-- .loop-nav -->
<?php
} elseif (!is_singular() && ($nav = get_posts_nav_link(array('sep' => '', 'prelabel' => '<span class="previous">' . __('<span class="meta-nav">←</span> Newer', 'socially-awkward') . '</span>', 'nxtlabel' => '<span class="next">' . __('Older <span class="meta-nav">→</span>', 'socially-awkward') . '</span>')))) {
?>
<div class="loop-nav">
<?php
echo $nav;
?>
</div><!-- .loop-nav -->
<?php
}
// End check for type of page.
开发者ID:Jessphung,项目名称:Phungtastic,代码行数:31,代码来源:loop-nav.php
示例11: previous_post_link
<?php previous_post_link( '<div class="previous"><span>' . __( 'Previous Post ', hybrid_get_parent_textdomain() ) . '</span>' . __('%link', hybrid_get_parent_textdomain()) . '</div>', '%title' ); ?>
<?php /*
<div class="previous">
<?php previous_post_link( '<span>' . __('%link', hybrid_get_parent_textdomain() ) . '</span>','Previous Post'); ?>
<?php previous_post_link( '%link','%title'); ?>
</div>
*/ ?>
<?php next_post_link( '<div class="next"><span>' . __( 'Next Post ', hybrid_get_parent_textdomain() ) . '</span>' . __('%link', hybrid_get_parent_textdomain()) . '</div>', '%title' ); ?>
<?php /*
<div class="next">
<?php next_post_link( '<span>' . __('%link', hybrid_get_parent_textdomain() ) . '</span>','Next Post'); ?>
<?php next_post_link( '%link','%title'); ?>
</div>
*/ ?>
<div class="clear"></div>
</div><!-- .loop-nav -->
<?php elseif ( !is_singular() && current_theme_supports( 'loop-pagination' ) ) : loop_pagination(); ?>
<?php elseif ( !is_singular() && $nav = get_posts_nav_link( array( 'sep' => '', 'prelabel' => '<span class="previous">' . __( '← Previous', hybrid_get_parent_textdomain() ) . '</span>', 'nxtlabel' => '<span class="next">' . __( 'Next →', hybrid_get_parent_textdomain() ) . '</span>' ) ) ) : ?>
<div class="loop-nav">
<?php echo $nav; ?>
</div><!-- .loop-nav -->
<?php endif; ?>
开发者ID:ryannmicua,项目名称:Pogidude-Hybrid,代码行数:30,代码来源:loop-nav.php
示例12: previous_post_link
<div class="loop-nav">
<?php
previous_post_link('%link', '<span class="previous">' . __('<span class="meta-nav">←</span> Previous', 'bon') . '</span>');
?>
<?php
next_post_link('%link', '<span class="next">' . __('Next <span class="meta-nav">→</span>', 'bon') . '</span>');
?>
</div><!-- .loop-nav -->
<?php
} elseif (!is_singular() && current_theme_supports('bon-pagination')) {
bon_pagination(array('container_class' => 'pagination-centered', 'disabled_class' => 'unavailable', 'current_class' => 'current'));
?>
<?php
} elseif (!is_singular() && ($nav = get_posts_nav_link(array('sep' => '', 'prelabel' => '<span class="previous">' . __('<span class="meta-nav">←</span> Older Entries', 'bon') . '</span>', 'nxtlabel' => '<span class="next">' . __('Newer Entries <span class="meta-nav">→</span>', 'bon') . '</span>')))) {
?>
<?php
if (!empty($nav)) {
?>
<div class="loop-nav">
<?php
echo $nav;
?>
</div><!-- .loop-nav -->
<?php
}
?>
<?php
}
开发者ID:VadimSid,项目名称:thinkgreek,代码行数:31,代码来源:loop-nav.php
示例13: previous_post_link
<div class="navigation-links">
<?php
previous_post_link('%link', '<span class="previous">' . __('« 上一篇', 'hybrid') . '</span>');
?>
<?php
next_post_link('%link', '<span class="next">' . __('下一篇 »', 'hybrid') . '</span>');
?>
</div><!-- .navigation-links -->
<?php
} elseif (!is_singular() && function_exists('wp_pagenavi')) {
wp_pagenavi();
?>
<?php
} elseif (!is_singular() && current_theme_supports('loop-pagination')) {
loop_pagination();
?>
<?php
} elseif (!is_singular() && ($nav = get_posts_nav_link(array('sep' => '', 'prelabel' => '<span class="previous">' . __('« 上一页', 'hybrid') . '</span>', 'nxtlabel' => '<span class="next">' . __('下一页 »', 'hybrid') . '</span>')))) {
?>
<div class="navigation-links">
<?php
echo $nav;
?>
</div><!-- .navigation-links -->
<?php
}
开发者ID:Fengtalk,项目名称:wp-theme-dongdong,代码行数:31,代码来源:loop-nav.php
示例14: elseif
<?php
} elseif (is_singular('post')) {
?>
<div class="loop-nav">
<?php
previous_post_link('%link', '<span class="previous">' . __('<span class="meta-nav">←</span> Previous', 'clea-base') . '</span>');
?>
<?php
next_post_link('%link', '<span class="next">' . __('Next <span class="meta-nav">→</span>', 'clea-base') . '</span>');
?>
</div><!-- .loop-nav -->
<?php
} elseif (!is_singular() && current_theme_supports('loop-pagination')) {
loop_pagination(array('prev_text' => __('<span class="meta-nav">←</span> Previous', 'clea-base'), 'next_text' => __('Next <span class="meta-nav">→</span>', 'clea-base')));
?>
<?php
} elseif (!is_singular() && ($nav = get_posts_nav_link(array('sep' => '', 'prelabel' => '<span class="previous">' . __('<span class="meta-nav">←</span> Previous', 'clea-base') . '</span>', 'nxtlabel' => '<span class="next">' . __('Next <span class="meta-nav">→</span>', 'clea-base') . '</span>')))) {
?>
<div class="loop-nav">
<?php
echo $nav;
?>
</div><!-- .loop-nav -->
<?php
}
开发者ID:aldelpech,项目名称:clea-base,代码行数:30,代码来源:loop-nav.php
示例15: framemarket_global_categories_theme
function framemarket_global_categories_theme($content)
{
global $wp_query;
if ($slug = get_query_var('global_taxonomy')) {
$args = array();
$args['echo'] = false;
$args['category'] = $slug;
//check for paging
if (get_query_var('paged')) {
$args['page'] = intval(get_query_var('paged'));
}
$content = framemarket_mp_list_global_products($args);
$content .= get_posts_nav_link();
} else {
//no category set, so show list
$content .= mp_global_categories_list(array('echo' => false));
}
return $content;
}
开发者ID:JeffreyBue,项目名称:jb,代码行数:19,代码来源:marketpress.php
示例16: previous_post_link
<div class="navigation-links">
<?php
previous_post_link('%link', '<span class="previous"><span class="symbol"><</span><span class="direction">Previous</span></span>');
?>
<?php
next_post_link('%link', '<span class="next"><span class="direction">Next</span><span class="symbol">></span></span>');
?>
</div><!-- .navigation-links -->
<?php
} elseif (!is_singular() && function_exists('wp_pagenavi')) {
wp_pagenavi();
?>
<?php
} elseif (!is_singular() && current_theme_supports('loop-pagination')) {
loop_pagination();
?>
<?php
} elseif (!is_singular() && ($nav = get_posts_nav_link(array('sep' => '', 'prelabel' => '<span class="previous"><span class="symbol"><</span><span class="direction">Previous</span></span>', 'nxtlabel' => '<span class="next"><span class="direction">Next</span><span class="symbol">></span></span>')))) {
?>
<div class="navigation-links">
<?php
echo $nav;
?>
</div><!-- .navigation-links -->
<?php
}
开发者ID:ryanmr,项目名称:mirai-theme,代码行数:31,代码来源:loop-nav.php
注:本文中的get_posts_nav_link函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论