当前位置: 首页>>代码示例>>PHP>>正文


PHP page_navi函数代码示例

本文整理汇总了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('&laquo; Older Entries', "bonestheme"));
        ?>
</li>
									<li class="next-link"><?php 
        previous_posts_link(_e('Newer Entries &raquo;', "bonestheme"));
开发者ID:niallobrien,项目名称:bones-responsive,代码行数:31,代码来源:author.php

示例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('&laquo; Older Entries') ?></li>
								<li class="next-link"><?php previous_posts_link('Newer Entries &raquo;') ?></li>
							</ul>
						</nav>
					<?php } ?>		
					
					<?php else : ?>
					
					<article id="post-not-found">
                    
                    <div class="article">
开发者ID:rpetersn,项目名称:WordPress-HTML5-Starter-Theme,代码行数:30,代码来源:index.php

示例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">&larr;</span> Older posts', 'wpforge'));
                ?>
</div>
			<div class="nav-next alignright"><?php 
                previous_posts_link(__('Newer posts <span class="meta-nav">&rarr;</span>', 'wpforge'));
                ?>
</div>
		</nav><!-- #<?php 
                echo $html_id;
                ?>
 .navigation -->
        <?php 
            }
            ?>
        
	<?php 
        }
    }
开发者ID:brifishjones,项目名称:wp-forge,代码行数:43,代码来源:functions.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">' . __('&larr; Older', 'mars') . '</a></li>', ' <li class="next">' . __('Newer &rarr;', 'mars') . '</a></li>');
            ?>
					                </ul>								
								<?php 
        }
    } else {
        ?>
			                <ul class="pager">
			                	<?php 
        posts_nav_link(' ', '<li class="previous">' . __('&larr; Older', 'mars') . '</a></li>', ' <li class="next">' . __('Newer &rarr;', 'mars') . '</a></li>');
        ?>
开发者ID:chypriote,项目名称:wp-video,代码行数:31,代码来源:author.php

示例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);
        }
    }
}
开发者ID:jaws-ug,项目名称:jfk2013,代码行数:10,代码来源:functions.php


注:本文中的page_navi函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。