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


PHP posts_nav_link函数代码示例

本文整理汇总了PHP中posts_nav_link函数的典型用法代码示例。如果您正苦于以下问题:PHP posts_nav_link函数的具体用法?PHP posts_nav_link怎么用?PHP posts_nav_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了posts_nav_link函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: NextAndPreviousPageLinks

function NextAndPreviousPageLinks()
{
    ?>
  <div class="post-navigation">
    <hr />
    <?php 
    posts_nav_link('', 'Newer Posts', 'Older Posts');
    ?>
  </div>
<?php 
}
开发者ID:gios-asu,项目名称:bemmy-wordpress-theme,代码行数:11,代码来源:NextAndPreviousPageLinks.php

示例2: next_previous_div

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-->';
    }
}
开发者ID:reggi,项目名称:wp-russian-constructivism-theme,代码行数:11,代码来源:functions.php

示例3: ebor_faq_shortcode

/**
 * 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;
}
开发者ID:gabriel-dehan,项目名称:erdf-sessions,代码行数:49,代码来源:vc_faq_block.php

示例4: theme_pagination

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();
    }
}
开发者ID:ConceptHaus,项目名称:beckery,代码行数:36,代码来源:wp-pagenavi.php

示例5: theme_pagination

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();
    }
}
开发者ID:developmentDM2,项目名称:CZND,代码行数:36,代码来源:wp-pagenavi.php

示例6: wp_pagenavi

}
?>
						
				    <?php 
if (function_exists('wp_pagenavi')) {
    ?>
				    <?php 
    wp_pagenavi();
    ?>
   
				    <?php 
} else {
    ?>
      
				      <div class="post-navigation"><p><?php 
    posts_nav_link('&#8734;', '&laquo;&laquo; Previous Posts', 'Older Posts &raquo;&raquo;');
    ?>
</p></div>
				    <?php 
}
?>
						
					</section><!-- end #post-content -->
	
					<?php 
get_sidebar();
?>
				
				</div><!-- end .sixteen columns -->
				
			</div><!-- end .container -->
开发者ID:peb7268,项目名称:capitolamedia.com,代码行数:31,代码来源:category-hot-topics.php

示例7: while

    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>
开发者ID:misfist,项目名称:loom-theme,代码行数:31,代码来源:loop-blogsidebar.php

示例8: posts_nav_link

		</div>


	
		<?php 
    }
    ?>

				<div class="navigation">
					<?php 
    posts_nav_link('', '', '&laquo; Previous Entries');
    ?>

					<?php 
    posts_nav_link('', 'Next Entries &raquo;', '');
    ?>

				</div>
		<?php 
} else {
    ?>


		<h2>Not Found</h2>
		<p><?php 
    _e("Sorry, but you are looking for something that isn't here.");
    ?>
</p>

		<?php 
开发者ID:TitaniumBunker,项目名称:dirty-blue,代码行数:30,代码来源:archive.php

示例9: _e

        ?>
	-->
	
	<?php 
    }
} else {
    ?>
	
	<p><?php 
    _e('Sorry, no posts matched your criteria.');
    ?>
</p><?php 
}
?>
	<?php 
posts_nav_link(' &#8212; ', __('&laquo; go back'), __('keep looking &raquo;'));
?>

	</div>
	
<?php 
include TEMPLATEPATH . "/l_sidebar.php";
?>

<?php 
include TEMPLATEPATH . "/r_sidebar.php";
?>

</div>

<!-- The main column ends  -->
开发者ID:serjmic,项目名称:Lite-Dance,代码行数:31,代码来源:home.php

示例10: edit_post_link

				</div>
			
				<p class="postfeedback">
				<?php 
        edit_post_link(__('Edit'), '&nbsp; {', '}');
        ?>
				</p>
			
			</div>
				
		<?php 
    }
    ?>

		<?php 
    posts_nav_link(' &#183; ', __('Next entries &raquo;'), __('&laquo; Previous entries'));
    ?>
		
	<?php 
} else {
    ?>

		<h2><?php 
    _e('Not Found');
    ?>
</h2>

		<p><?php 
    _e('Sorry, but the page you requested cannot be found.');
    ?>
</p>
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:31,代码来源:archive.php

示例11: the_post_thumbnail

        //вывод ссылки
        ?>
"><?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();
开发者ID:boltogriz,项目名称:fashion-wordpress,代码行数:31,代码来源:category.php

示例12: _e

    ?>
			</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(' | ', __('&larr;&nbsp;Newer&nbsp;Posts', 'p2'), __('Older&nbsp;Posts&nbsp;&rarr;', 'p2'));
?>
</p>
		</div>
		
	</div> <!-- main -->

</div> <!-- sleeve -->

<?php 
get_footer();
开发者ID:alx,项目名称:pressmark,代码行数:31,代码来源:tag.php

示例13: wp_link_pages

        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('', __('&laquo; Newer Posts'), '');
?>
</div>
			<div class="alignright"><?php 
posts_nav_link('', '', __('Older Posts &raquo;'));
?>
</div>
		</div>
			<?php 
get_footer();
开发者ID:rogopag,项目名称:webeventi,代码行数:31,代码来源:index.php

示例14: the_excerpt

            <?php 
        the_excerpt();
        ?>
<p><a href="<?php 
        echo get_permalink();
        ?>
">Read More &rarr;</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();
开发者ID:acrisdesign,项目名称:bizchoco,代码行数:31,代码来源:blog_template2.php

示例15: the_excerpt

        ?>
</a></h3>
						<?php 
        the_excerpt();
        ?>
					</li>

					<?php 
    }
    ?>

				</ol>
			</article>
			<nav>
				<p><?php 
    posts_nav_link('&nbsp;&bull;&nbsp;');
    ?>
</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>
开发者ID:htmlgraphic,项目名称:Remodeling-Appleton,代码行数:31,代码来源:search.php


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