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


PHP get_the_post_navigation函数代码示例

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


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

示例1: bootswatch_post_navigation

/**
 * Prints previous and next posts links.
 */
function bootswatch_post_navigation()
{
    $replacements = ['<div class="nav-links">' => '<ul class="nav-links pager">', '<div class="nav-previous">' => '<li class="nav-previous previous">', '<div class="nav-next">' => '<li class="nav-next next">', '</a></div>' => '</a></li>', 'rel="prev">' => 'rel="prev">« ', '</a></li></div>' => ' »</a></li></ul>'];
    $replacements = apply_filters('bootswatch_post_navigation_replacements', $replacements);
    echo str_replace(array_keys($replacements), array_values($replacements), get_the_post_navigation());
    // WPCS XSS OK.
}
开发者ID:kadimi,项目名称:bootswatch,代码行数:10,代码来源:template-tags.php

示例2: lightseek_post_navigation

function lightseek_post_navigation($args = array('prev_text' => '<span class="fa fa-caret-left" aria-hidden="true"></span> %title', 'next_text' => '%title <span class="fa fa-caret-right" aria-hidden="true"></span>'))
{
    $out = get_the_post_navigation($args);
    $out = str_replace("<div class=\"nav-links\">", "<ul class=\"nav-links pager\">", $out);
    $out = str_replace("</div></div>", "</div></ul>", $out);
    $out = str_replace("<div class=\"nav-next\">", " <li class='nav-next pager-next' title='Next Post'>", $out);
    $out = str_replace("<div class=\"nav-previous\">", " <li class='nav-previous pager-prev' title='Previous Post'>", $out);
    $out = str_replace("</div>", "", $out);
    echo $out;
}
开发者ID:amielucha,项目名称:lightseek,代码行数:10,代码来源:template-tags.php

示例3: the_post_navigation

/**
 * Display navigation to next/previous post when applicable.
 *
 * @since 4.1.0
 *
 * @param array $args Optional. See {@see get_the_post_navigation()} for available
 *                    arguments. Default empty array.
 */
function the_post_navigation($args = array())
{
    echo get_the_post_navigation($args);
}
开发者ID:rizkafitri,项目名称:WordPress-1,代码行数:12,代码来源:link-template.php

示例4: the_title

the_title();
?>
</h1>

	</header><!-- .entry-header -->


	<div class="entry-content" itemprop="mainContentOfPage">

		<?php 
the_content();
?>

		<?php 
if (function_exists('get_the_post_navigation')) {
    echo get_the_post_navigation(array('prev_text' => __('&larr; Previous Page', 'bs'), 'next_text' => __('Next Page &rarr;', 'bs'), 'screen_reader_text' => __('Page navigation', 'bs')));
} else {
    wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'bs'), 'after' => '</div>'));
}
?>


	</div><!-- .entry-content -->
	<?php 
edit_post_link(__('Edit', 'bs'), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>');
?>
	<?php 
tha_entry_bottom();
?>
</article><!-- #post-## -->
<?php 
开发者ID:love4code,项目名称:bootstrap_wp,代码行数:31,代码来源:content-page.php

示例5: some_like_it_neat_post_navigation

 function some_like_it_neat_post_navigation()
 {
     if (function_exists('get_the_post_navigation') && is_singular() && !is_page_template('page-templates/template-landing-page.php')) {
         echo get_the_post_navigation(array('prev_text' => __('&larr; %title', 'some-like-it-neat'), 'next_text' => __('%title &rarr;', 'some-like-it-neat'), 'screen_reader_text' => __('Page navigation', 'some-like-it-neat')));
     } else {
         wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'some-like-it-neat'), 'after' => '</div>'));
     }
 }
开发者ID:jeremyraymond,项目名称:personal-wordpress-site,代码行数:8,代码来源:functions.php

示例6: get_template_part

			<?php 
    get_template_part('loop-hoge');
    ?>
		<?php 
} else {
    ?>
			<?php 
    get_template_part('loop');
    ?>
		<?php 
}
?>

		<?php 
// post_navigation
$nav = get_the_post_navigation(array('in_same_term' => 'true', 'prev_text' => '前の記事 : %title', 'next_text' => '次の記事 : %title'));
echo '<div class="container">';
echo $nav;
echo '</div>';
?>

		<?php 
comments_template();
?>

	</div><!-- main-contant end -->

	<?php 
get_sidebar();
?>
开发者ID:kouichi-hoshi,项目名称:sd-theme,代码行数:30,代码来源:single.php

示例7: sazerac_post_navigation

 function sazerac_post_navigation()
 {
     if (function_exists('get_the_post_navigation') && is_singular()) {
         echo get_the_post_navigation(array('prev_text' => __('&larr; %title', 'sazerac'), 'next_text' => __('%title &rarr;', 'sazerac'), 'screen_reader_text' => __('Page navigation', 'sazerac')));
     } else {
         wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'sazerac'), 'after' => '</div>'));
     }
 }
开发者ID:helgatheviking,项目名称:sazerac,代码行数:8,代码来源:functions.php

示例8: the_post_navigation

 /**
  * Display navigation to next/previous post when applicable.
  *
  * @todo Remove this function when WordPress 4.3 is released.
  *
  * @param array $args Optional. See {@see get_the_post_navigation()} for available
  *                    arguments. Default empty array.
  */
 function the_post_navigation($args = array())
 {
     echo balanceTags(get_the_post_navigation($args));
 }
开发者ID:henrikauppinen,项目名称:lpk15-website-wp,代码行数:12,代码来源:template-tags.php

示例9: the_widget

				<div class="column-side-content" style="display: block;">
					<div class="sidebar-widget">
						<?php 
if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('widget-area-1')) {
}
?>
					</div>
					<div class="sidebar-widget">
						<?php 
the_widget('WP_Widget_Recent_Posts', array(), array('before_title' => '<h3>', 'after_title' => '</h3>'));
?>
					</div>
					<div class="sidebar-widget">
						<article class="widget">
							<?php 
echo get_the_post_navigation(array('next_text' => '<span class="meta-nav" aria-hidden="true">' . __('Next', 'woopstrapblank') . '</span> ' . '<span class="screen-reader-text">' . __('Next post:', 'woopstrapblank') . '</span> ' . '<span class="post-title">%title</span>', 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __('Previous', 'woopstrapblank') . '</span> ' . '<span class="screen-reader-text">' . __('Previous post:', 'woopstrapblank') . '</span> ' . '<span class="post-title">%title</span>', 'screen_reader_text' => __('Post navigation', 'woopstrapblank')));
?>
						</article>
					</div>
				</div>
				<!-- /column-side-content -->

			</div>
			<!-- /row -->
		</div>
		<!-- /container -->
	</div>
	<!-- /section -->

<?php 
get_footer();
开发者ID:alessiosantocs,项目名称:dental-studio,代码行数:31,代码来源:single.php

示例10: checkout_post_navs

 /**
  * Displays next/previous post navigations
  *
  * @since checkout 1.0
  */
 function checkout_post_navs()
 {
     $nav_args = array('prev_text' => '<div class="nav-text"><span>' . __('Previous', 'checkout') . ' <i class="fa fa-angle-right"></i></span> <h4>%title</h4></div>', 'next_text' => '<div class="nav-text"><span><i class="fa fa-angle-left"></i> ' . __('Next', 'checkout') . '</span> <h4>%title</h4></div>', 'screen_reader_text' => __('Post navigation', 'checkout'));
     echo get_the_post_navigation($nav_args);
 }
开发者ID:qhuit,项目名称:UrbanPekor,代码行数:10,代码来源:functions.php


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