本文整理汇总了PHP中the_post_navigation函数的典型用法代码示例。如果您正苦于以下问题:PHP the_post_navigation函数的具体用法?PHP the_post_navigation怎么用?PHP the_post_navigation使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了the_post_navigation函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: vtstheme_entry_footer
/**
* Prints HTML with meta information for the categories, tags and comments.
*/
function vtstheme_entry_footer()
{
// Hide category and tag text for pages.
if ('post' === get_post_type()) {
/* translators: used between list items, there is a space after the comma */
// $categories_list = get_the_category_list( esc_html__( ', ', 'vtstheme' ) );
// if ( $categories_list && vtstheme_categorized_blog() && strpos($categories_list,'Uncategorized') === false ) {
// printf( '<span class="cat-links">' . esc_html__( 'Posted in %1$s', 'vtstheme' ) . '</span>', $categories_list ); // WPCS: XSS OK.
// }
/* translators: used between list items, there is a space after the comma */
// $tags_list = get_the_tag_list( '', esc_html__( ', ', 'vtstheme' ) );
// if ( $tags_list ) {
// printf( '<span class="tags-links">' . esc_html__( 'Tagged %1$s', 'vtstheme' ) . '</span>', $tags_list ); // WPCS: XSS OK.
// }
the_post_navigation(['prev_text' => '<i class="fa fa-chevron-left"></i>Prev', 'next_text' => 'Next<i class="fa fa-chevron-right"></i>']);
echo '<a id="share-toggle" class="button secondary share"><i class="fa fa-share"></i> Share</a>';
naked_social_share_buttons();
}
// if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
// echo '<span class="comments-link">';
// comments_popup_link( esc_html__( 'Leave a comment', 'vtstheme' ), esc_html__( '1 Comment', 'vtstheme' ), esc_html__( '% Comments', 'vtstheme' ) );
// echo '</span>';
// }
// edit_post_link( esc_html__( 'Edit', 'vtstheme' ), '<span class="edit-link">', '</span>' );
}
开发者ID:joshuarrrr,项目名称:vts-theme,代码行数:28,代码来源:template-tags.php
示例2: ultra_posted_on
/**
* Prints HTML with meta information for the current post-date/time, author, comment count and categories.
*/
function ultra_posted_on()
{
echo '<div class="entry-meta-inner">';
if (is_sticky() && is_home() && !is_paged()) {
echo '<span class="featured-post">' . __('Sticky', 'ultra') . '</span>';
}
if (is_home() && siteorigin_setting('blog_post_date') || is_archive() && siteorigin_setting('blog_post_date') || is_search() && siteorigin_setting('blog_post_date')) {
echo '<span class="entry-date"><a href="' . esc_url(get_permalink()) . '" rel="bookmark"><time class="published" datetime="' . esc_attr(get_the_date('c')) . '">' . esc_html(get_the_date('j F Y')) . '</time><time class="updated" datetime="' . esc_attr(get_the_modified_date('c')) . '">' . esc_html(get_the_modified_date()) . '</time></span></a>';
}
if (is_single() && siteorigin_setting('blog_post_date')) {
echo '<span class="entry-date"><time class="published" datetime="' . esc_attr(get_the_date('c')) . '">' . esc_html(get_the_date('j F Y')) . '</time><time class="updated" datetime="' . esc_attr(get_the_modified_date('c')) . '">' . esc_html(get_the_modified_date()) . '</time></span>';
}
if (siteorigin_setting('blog_post_author')) {
echo '<span class="byline"><span class="author vcard"><a class="url fn n" href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '" rel="author">' . esc_html(get_the_author()) . '</a></span></span>';
}
if (comments_open() && siteorigin_setting('blog_post_comment_count')) {
echo '<span class="comments-link">';
comments_popup_link(__('Leave a comment', 'ultra'), __('1 Comment', 'ultra'), __('% Comments', 'ultra'));
echo '</span>';
}
echo '</div>';
if (is_single() && siteorigin_setting('navigation_post_nav')) {
the_post_navigation($args = array('prev_text' => '', 'next_text' => ''));
}
}
开发者ID:craighays,项目名称:wpcraighays,代码行数:28,代码来源:template-tags.php
示例3: avocation_pagination
function avocation_pagination()
{
if (is_single()) {
the_post_navigation(array('prev_text' => '<div class="avocation_previous_pagination alignleft">%title</div>', 'next_text' => '<div class="avocation_next_pagination alignright">%title</div>'));
} else {
the_posts_pagination(array('prev_text' => '<i class="fa fa-angle-double-left"></i>', 'next_text' => '<i class="fa fa-angle-double-right"></i>', 'before_page_number' => '<span class="meta-nav screen-reader-text"></span>'));
}
}
开发者ID:stvnfrancisco,项目名称:art_portfolio_wordpress,代码行数:8,代码来源:theme-default-setup.php
示例4: multishop_pagination
function multishop_pagination()
{
?>
<div class="col-md-12 multishop-default-pagination ">
<?php
if (is_single()) {
the_post_navigation(array('next_text' => '<span class="multishop_next_pagination meta-nav" aria-hidden="true">%title</span>', 'prev_text' => '<span class="multishop_previous_pagination meta-nav" aria-hidden="true">%title</span>'));
} else {
the_posts_pagination(array('prev_text' => __('<<'), 'next_text' => __('>>'), 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __('Page', 'multishop') . ' </span>'));
}
?>
</div>
<?php
}
开发者ID:obecolette,项目名称:wordpress,代码行数:14,代码来源:theme-default-setup.php
示例5: twentyfifteen_entry_meta
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php twentyfifteen_entry_meta(); ?>
<?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
<?php
// If comments are open or we have at least one comment, load up the comment template
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
// Previous/next post navigation.
the_post_navigation( array(
'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'twentyfifteen' ),
) );
// End the loop.
endwhile;
?>
</main><!-- .site-main -->
</div><!-- .content-area -->
<?php get_footer(); ?>
>>>>>>> b875702c9c06ab5012e52ff4337439b03918f453
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:30,代码来源:image.php
示例6: dynamicnews_display_post_navigation
function dynamicnews_display_post_navigation()
{
// Get Theme Options from Database
$theme_options = dynamicnews_theme_options();
if (true == $theme_options['post_navigation']) {
the_post_navigation(array('prev_text' => '« %title', 'next_text' => '%title »'));
}
}
开发者ID:robocon,项目名称:waianubal,代码行数:8,代码来源:template-tags.php
示例7: get_header
* The template for displaying all single posts and attachments
*
* @package WordPress
* @subpackage Twenty_Fifteen
* @since Twenty Fifteen 1.0
*/
get_header();
?>
<?php
// Start the loop.
while (have_posts()) {
the_post();
/*
* Include the post format-specific template for the content. If you want to
* use this in a child theme, then include a file called called content-___.php
* (where ___ is the post format) and that will be used instead.
*/
get_template_part('content', get_post_format());
// If comments are open or we have at least one comment, load up the comment template.
// if ( comments_open() || get_comments_number() ) :
// comments_template();
// endif;
// Previous/next post navigation.
the_post_navigation(array('next_text' => '<span class="meta-nav next" aria-hidden="true">' . __('NEXT', 'twentyfifteen') . '</span>', 'prev_text' => '<span class="meta-nav prev" aria-hidden="true">' . __('PREVIOUS', 'twentyfifteen') . '</span>'));
// End the loop.
}
?>
<?php
get_footer();
开发者ID:foresitegroup,项目名称:TeeToGreen,代码行数:31,代码来源:single.php
示例8: the_permalink
<h3><a href="<?php
the_permalink();
?>
"><?php
the_title();
?>
</a><span><?php
the_date_xml();
?>
</span></h3>
<p><?php
the_content();
?>
</p>
</div>
</div>
<div class="row page_nav">
<div class="col-xs-10">
<?php
the_post_navigation(array('next_text' => '<div class="col-xs-4" style="float: right"><p>' . __('Наступна стаття: ', 'example') . '<span class="post-title">%title</span></p></div>', 'prev_text' => '<div class="col-xs-4" style="float: left"><p>' . __('Попередня стаття: ', 'example') . '<span class="post-title">%title</span></p></div>', 'screen_reader_text' => ' '));
}
?>
</div>
</div>
<!--<?php
/*get_sidebar(); */
?>
-->
</div><!--/DIV CONTENT -->
<?php
get_footer();
开发者ID:Rumoruka,项目名称:Natureblog,代码行数:31,代码来源:single.php
示例9: wp_link_pages
wp_link_pages(array('before' => '<div class="page-links u-textAlignCenter comment-navigation">', 'after' => '</div>', 'link_before' => '<span class="page-link-item">', 'link_after' => '</span>', 'pagelink' => '%', 'separator' => '<span class="screen-reader-text">, </span>'));
?>
<div class="post--keywords" itemprop="keywords">
<?php
echo puma_get_the_term_list(get_the_ID(), 'post_tag');
?>
</div>
<div class="postFooterAction">
<?php
if (function_exists('wp_postlike')) {
wp_postlike();
}
?>
</div>
<?php
the_post_navigation(array('next_text' => '<span class="meta-nav">Next</span><span class="post-title">%title</span>', 'prev_text' => '<span class="meta-nav">Previous</span><span class="post-title">%title</span>'));
?>
<div class="postFooterinfo u-textAlignCenter">
<?php
echo get_avatar(get_the_author_meta('email'), 64);
?>
<h3 class="author-name"><?php
the_author();
?>
</h3>
<div class="author-description"><?php
echo get_the_author_meta('description');
?>
</div>
<div class="author-meta">
<?php
开发者ID:JYzor,项目名称:Puma,代码行数:31,代码来源:single.php
示例10: get_header
* @package bobderrico
*/
get_header();
?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php
while (have_posts()) {
the_post();
get_template_part('template-parts/hero', 'single-job');
?>
<div class="content-wrap">
<?php
get_template_part('template-parts/content', 'single-job');
the_post_navigation(['prev_text' => '← ' . __('Previous Job', 'bobderrico'), 'next_text' => __('Next Job', 'bobderrico;') . ' →']);
// If comments are open or we have at least one comment, load up the comment template.
if (comments_open() || get_comments_number()) {
comments_template();
}
}
// End of the loop.
?>
</div>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_footer();
开发者ID:bobderrico80,项目名称:bobderrico-v2,代码行数:31,代码来源:single-job.php
示例11: eighteen_tags_post_nav
/**
* Display navigation to next/previous post when applicable.
*/
function eighteen_tags_post_nav()
{
$args = array('next_text' => '%title <span class="meta-nav">→</span>', 'prev_text' => '<span class="meta-nav">←</span> %title');
the_post_navigation($args);
}
开发者ID:pootlepress,项目名称:18-tags,代码行数:8,代码来源:post.php
示例12: get_header
*/
get_header();
?>
<?php
/* Start the Loop */
?>
<?php
while (have_posts()) {
the_post();
?>
<?php
get_template_part('content/content', get_post_type());
?>
<?php
// If comments are open or we have at least one comment, load up the comment template.
if (comments_open() || get_comments_number()) {
comments_template();
}
// Previous/next post navigation.
the_post_navigation(array('next_text' => '<span class="meta-nav nav-next">' . __('Next post', 'peek') . ': %title</span>', 'prev_text' => '<span class="meta-nav nav-previous">' . __('Previous post', 'peek') . ': %title</span>'));
?>
<?php
}
?>
<?php
get_footer();
开发者ID:rewdy,项目名称:peek,代码行数:31,代码来源:single.php
示例13: while
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php
// Start the loop.
while (have_posts()) {
the_post();
// Include the single post content template.
get_template_part('template-parts/content', 'single');
// If comments are open or we have at least one comment, load up the comment template.
if (comments_open() || get_comments_number()) {
comments_template();
}
if (is_singular('attachment')) {
// Parent post navigation.
the_post_navigation(array('prev_text' => _x('<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'tpbc')));
} elseif (is_singular('post')) {
// Previous/next post navigation.
the_post_navigation(array('next_text' => '<span class="screen-reader-text">' . __('Next post:', 'tpbc') . '</span> ' . '<span class="post-title">%title</span>', 'prev_text' => '<span class="screen-reader-text">' . __('Previous post:', 'tpbc') . '</span> ' . '<span class="post-title">%title</span>'));
}
// End of the loop.
}
?>
</main><!-- .site-main -->
</div><!-- .content-area -->
<?php
get_sidebar();
get_footer();
开发者ID:mummybot,项目名称:tpbc,代码行数:30,代码来源:single.php
示例14: the_post_thumbnail
if (has_post_thumbnail()) {
the_post_thumbnail();
}
?>
<?php
the_content();
?>
<?php
wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'wanderlist'), 'after' => '</div>'));
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php
the_post_navigation(array('prev_text' => '<span>Previous</span> %title', 'next_text' => '<span>Next</span> %title'));
?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
<?php
if (comments_open() || get_comments_number()) {
comments_template();
}
?>
<?php
}
// end of the loop.
?>
开发者ID:sarahmonster,项目名称:wanderlist,代码行数:30,代码来源:single-wanderlist-location.php
示例15: comments_template
if (comments_open() || get_comments_number()) {
?>
<?php
comments_template();
?>
<?php
}
?>
<?php
if (is_singular('attachment')) {
// Parent post navigation.
the_post_navigation(array('prev_text' => _x('<span class="meta-nav">Published in</span>' . '<span class="post-title">%title</span>', 'Parent post link', 'AQUNTALLC_SITENAME')));
} elseif (is_singular('post')) {
// Previous/next post navigation.
the_post_navigation(array('prev_text' => '<span class="meta-nav pull-left" aria-hidden="true">' . '<i class="fa fa-chevron-left"></i>' . ' <span class="post-title">%title</span>' . '</span>', 'next_text' => '<span class="meta-nav pull-right" aria-hidden="true">' . '<span class="post-title">%title</span>' . ' <i class="fa fa-chevron-right"></i>' . '</span>', 'screen_reader_text' => __('Other Articles')));
echo "<div class=\"clearfix\"> </div><hr/>";
}
?>
<?php
}
// End of the loop.
?>
<?php
get_sidebar('article-after');
?>
</div><!-- .single-content -->
开发者ID:alexluecke,项目名称:aq-default-wordpress-template,代码行数:30,代码来源:single.php
示例16: get_header
get_header();
get_template_part('template-parts/headline');
?>
<section id="content">
<div class="container">
<div class="row">
<div class="col-lg-8">
<?php
while (have_posts()) {
the_post();
echo '<h2>' . get_the_title() . '</h2>';
the_content();
the_post_navigation(array('next_text' => '<span class="screen-reader-text">Следующая запись</span> ' . '<span class="post-title">%title</span>', 'prev_text' => '<span class="screen-reader-text">Предыдущая запись</span> ' . '<span class="post-title">%title</span>'));
?>
<?php
// If comments are open or we have at least one comment, load up the comment template.
if (comments_open() || get_comments_number()) {
comments_template();
}
}
// End of the loop.
?>
</div>
<div class="col-lg-4">
<aside class="right-sidebar">
开发者ID:nordcap,项目名称:wp_template_moderna,代码行数:31,代码来源:single.php
示例17: wp_link_pages
wp_link_pages(array('before' => '<div class="page-links"><span class="page-links-title">' . __('Pages:', 'conversationsmp') . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>', 'pagelink' => '<span class="screen-reader-text">' . __('Page', 'conversationsmp') . ' </span>%', 'separator' => '<span class="screen-reader-text">, </span>'));
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php
conversationsmp_entry_meta();
?>
<?php
edit_post_link(__('Edit', 'conversationsmp'), '<span class="edit-link">', '</span>');
?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
<?php
// If comments are open or we have at least one comment, load up the comment template
if (comments_open() || get_comments_number()) {
comments_template();
}
// Previous/next post navigation.
the_post_navigation(array('prev_text' => _x('<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'conversationsmp')));
// End the loop.
}
?>
</main><!-- .site-main -->
</div><!-- .content-area -->
<?php
get_footer();
开发者ID:jrjacobs24,项目名称:ConversationsMP-App,代码行数:31,代码来源:image.php
示例18: get_header
/**
* The template for displaying all single posts.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package SIKO
*/
get_header();
?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php
while (have_posts()) {
the_post();
get_template_part('template-parts/content', get_post_format());
the_post_navigation(array('next_text' => '<span class="meta-nav" aria-hidden="true">' . __('Næste', 'sikosass') . '</span>' . '<br>' . '<span class="screen-reader-text">' . __('Næste post', 'sikosass') . '</span>' . '<span class="post-title">%title</span>', 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __('Forige', 'sikosass') . '</span>' . '<br>' . '<span class="screen-reader-text">' . __('Forige post', 'sikosass') . '</span>' . '<span class="post-title">%title</span>'));
?>
<?php
}
// End of the loop.
?>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_footer();
开发者ID:WolffDev,项目名称:sikosass,代码行数:30,代码来源:single.php
示例19: get_header
*/
get_header();
?>
<div class="wrap">
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php
/* Start the Loop */
while (have_posts()) {
the_post();
get_template_part('template-parts/post/content', get_post_format());
// If comments are open or we have at least one comment, load up the comment template.
if (comments_open() || get_comments_number()) {
comments_template();
}
the_post_navigation(array('prev_text' => '<span class="screen-reader-text">' . __('Previous Post', 'twentyseventeen') . '</span><span aria-hidden="true" class="nav-subtitle">' . __('Previous', 'twentyseventeen') . '</span> <span class="nav-title"><span class="nav-title-icon-wrapper">' . twentyseventeen_get_svg(array('icon' => 'arrow-left')) . '</span>%title</span>', 'next_text' => '<span class="screen-reader-text">' . __('Next Post', 'twentyseventeen') . '</span><span aria-hidden="true" class="nav-subtitle">' . __('Next', 'twentyseventeen') . '</span> <span class="nav-title">%title<span class="nav-title-icon-wrapper">' . twentyseventeen_get_svg(array('icon' => 'arrow-right')) . '</span></span>'));
}
// End of the loop.
?>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_sidebar();
?>
</div><!-- .wrap -->
<?php
get_footer();
开发者ID:CompositeUK,项目名称:clone.WordPress-Develop,代码行数:31,代码来源:single.php
示例20: get_header
/**
* The template for displaying all single posts.
*
* @package �
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'template-parts/content', 'single' ); ?>
<?php the_post_navigation(); ?>
<?php
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
<?php endwhile; // End of the loop. ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
开发者ID:scotchfield,项目名称:heart,代码行数:31,代码来源:single.php
注:本文中的the_post_navigation函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论