當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。