本文整理汇总了PHP中page_navi函数的典型用法代码示例。如果您正苦于以下问题:PHP page_navi函数的具体用法?PHP page_navi怎么用?PHP page_navi使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了page_navi函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: page_navi
</footer> <!-- end article footer -->
</article> <!-- end article -->
<?php
}
?>
<?php
if (function_exists('page_navi')) {
// if expirimental feature is active
?>
<?php
page_navi();
// use the page navi function
?>
<?php
} else {
// if it is disabled, display regular wp prev & next links
?>
<nav class="wp-prev-next">
<ul class="clearfix">
<li class="prev-link"><?php
next_posts_link(_e('« Older Entries', "bonestheme"));
?>
</li>
<li class="next-link"><?php
previous_posts_link(_e('Newer Entries »', "bonestheme"));
示例2: the_tags
<p class="tags"><?php the_tags('<span class="tags-title">Tags:</span> ', ', ', ''); ?></p>
</footer> <!-- end article footer -->
</div>
</article> <!-- end article -->
<?php comments_template(); ?>
<?php endwhile; ?>
<?php if (function_exists('page_navi')) { // if expirimental feature is active ?>
<?php page_navi(); // use the page navi function ?>
<?php } else { // if it is disabled, display regular wp prev & next links ?>
<nav class="wp-prev-next">
<ul class="clearfix">
<li class="prev-link"><?php next_posts_link('« Older Entries') ?></li>
<li class="next-link"><?php previous_posts_link('Newer Entries »') ?></li>
</ul>
</nav>
<?php } ?>
<?php else : ?>
<article id="post-not-found">
<div class="article">
示例3: wpforge_content_nav
function wpforge_content_nav($html_id)
{
global $wp_query;
$html_id = esc_attr($html_id);
if ($wp_query->max_num_pages > 1) {
?>
<?php
if (function_exists('page_navi')) {
?>
<?php
page_navi();
?>
<?php
} else {
?>
<nav id="<?php
echo $html_id;
?>
" class="navigation" role="navigation">
<h3 class="assistive-text"><?php
_e('Post navigation', 'wpforge');
?>
</h3>
<div class="nav-previous alignleft"><?php
next_posts_link(__('<span class="meta-nav">←</span> Older posts', 'wpforge'));
?>
</div>
<div class="nav-next alignright"><?php
previous_posts_link(__('Newer posts <span class="meta-nav">→</span>', 'wpforge'));
?>
</div>
</nav><!-- #<?php
echo $html_id;
?>
.navigation -->
<?php
}
?>
<?php
}
}
示例4: while
while (have_posts()) {
the_post();
?>
<?php
apply_filters('videotube_author_loop_content', null);
?>
<?php
}
?>
<?php
print apply_filters('videotube_author_loop_after', null);
?>
<?php
if ($videotube['enable_channelpage'] == 1) {
if (function_exists('page_navi')) {
page_navi(array('elm_class' => 'pagination', 'current_class' => 'active', 'current_format' => '<a>%d</a>'));
} else {
?>
<ul class="pager">
<?php
posts_nav_link(' ', '<li class="previous">' . __('← Older', 'mars') . '</a></li>', ' <li class="next">' . __('Newer →', 'mars') . '</a></li>');
?>
</ul>
<?php
}
} else {
?>
<ul class="pager">
<?php
posts_nav_link(' ', '<li class="previous">' . __('← Older', 'mars') . '</a></li>', ' <li class="next">' . __('Newer →', 'mars') . '</a></li>');
?>
示例5: get_ps_page_navi
function get_ps_page_navi()
{
global $wp_query;
if (function_exists('page_navi')) {
if ($wp_query->max_num_pages > 1) {
$args = array('items' => 5, 'show_boundary' => false, 'edge_type' => 'none', 'navi_element' => 'nav', 'elm_class' => 'archive-nav', 'echo' => false);
return page_navi($args);
}
}
}