本文整理汇总了PHP中wp_link_pages函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_link_pages函数的具体用法?PHP wp_link_pages怎么用?PHP wp_link_pages使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wp_link_pages函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: story_link_pages
/**
* Content pagination
*/
function story_link_pages($content)
{
if (is_single()) {
$content .= wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'story'), 'after' => '</div>', 'echo' => 0));
}
return $content;
}
开发者ID:pennlabs,项目名称:blog,代码行数:10,代码来源:template-tags.php
示例2: tc_post_content
/**
* The default template for displaying single post content
*
* @package Customizr
* @since Customizr 3.0
*/
function tc_post_content()
{
//check conditional tags : we want to show single post or single custom post types
global $post;
$tc_show_single_post_content = isset($post) && 'page' != $post->post_type && 'attachment' != $post->post_type && is_singular() && !tc__f('__is_home_empty');
if (!apply_filters('tc_show_single_post_content', $tc_show_single_post_content)) {
return;
}
//display an icon for div if there is no title
$icon_class = in_array(get_post_format(), array('quote', 'aside', 'status', 'link')) ? apply_filters('tc_post_format_icon', 'format-icon') : '';
ob_start();
do_action('__before_content');
?>
<section class="entry-content <?php
echo $icon_class;
?>
">
<?php
the_content(__('Continue reading <span class="meta-nav">→</span>', 'customizr'));
?>
<?php
wp_link_pages(array('before' => '<div class="pagination pagination-centered">' . __('Pages:', 'customizr'), 'after' => '</div>'));
?>
</section><!-- .entry-content -->
<?php
do_action('__after_content');
$html = ob_get_contents();
if ($html) {
ob_end_clean();
}
echo apply_filters('tc_post_content', $html);
}
开发者ID:andrewfandrew,项目名称:bronze-boar,代码行数:41,代码来源:class-content-post.php
示例3: storefront_post_content
/**
* Display the post content with a link to the single post
* @since 1.0.0
*/
function storefront_post_content()
{
?>
<?php
if (is_search()) {
?>
<div class="entry-summary">
<h2><a href="<?php
the_permalink();
?>
"><?php
the_title();
?>
</a></h2>
<?php
the_excerpt();
?>
</div><!-- .entry-summary -->
<?php
} else {
?>
<div class="entry-content" itemprop="articleBody">
<?php
if (has_post_thumbnail()) {
the_post_thumbnail('full', array('itemprop' => 'image'));
}
the_content(sprintf(__('Continue reading %s', 'storefront'), '<span class="screen-reader-text">' . get_the_title() . '</span>'));
wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'storefront'), 'after' => '</div>'));
?>
</div><!-- .entry-content -->
<?php
}
}
开发者ID:jasonmcclurg,项目名称:lbm,代码行数:37,代码来源:post.php
示例4: render_content
/**
* Template for fallback single post view (ie. when no Flow Template assigned, this loop template will be in use)
*
* @package ThemifyFlow
* @since 1.0.0
*/
function render_content()
{
?>
<?php
if (have_posts()) {
while (have_posts()) {
the_post();
?>
<?php
get_template_part('includes/loop', 'single');
?>
<?php
wp_link_pages(array('before' => '<p><strong>' . __('Pages:', 'themify-flow') . ' </strong>', 'after' => '</p>', 'next_or_number' => 'number'));
?>
<?php
comments_template();
?>
<?php
}
}
?>
<?php
}
开发者ID:jhostetter,项目名称:wp_intern_themes,代码行数:35,代码来源:single.php
示例5: tc_page_content
/**
* The template part for displaying page content
*
* @package Customizr
* @since Customizr 3.0
*/
function tc_page_content() {
if ( 'page' != tc__f('__post_type') || ! is_singular() || tc__f( '__is_home_empty') )
return;
ob_start();
do_action( '__before_content' );
?>
<div class="entry-content">
<?php
the_content( __( 'Continue reading <span class="meta-nav">→</span>' , 'customizr' ) );
wp_link_pages( array(
'before' => '<div class="btn-toolbar page-links"><div class="btn-group">' . __( 'Pages:' , 'customizr' ),
'after' => '</div></div>',
'link_before' => '<button class="btn btn-small">',
'link_after' => '</button>',
'separator' => '',
)
);
?>
</div>
<?php
do_action( '__after_content' );
$html = ob_get_contents();
if ($html) ob_end_clean();
echo apply_filters( 'tc_page_content', $html );
}
开发者ID:niamherinoc,项目名称:rctractors,代码行数:36,代码来源:class-content-page.php
示例6: get_post_pagination
function get_post_pagination()
{
if (!$this->is_single) {
return '';
}
return wp_link_pages(array('before' => '<div class="page-nav page-nav-post td-pb-padding-side">', 'after' => '</div>', 'link_before' => '<div>', 'link_after' => '</div>', 'echo' => false, 'nextpagelink' => '<i class="td-icon-menu-right"></i>', 'previouspagelink' => '<i class="td-icon-menu-left"></i>'));
}
开发者ID:ryandong82,项目名称:colorfulladysite,代码行数:7,代码来源:td_module_single_base.php
示例7: test_thematic_link_pages_args
function test_thematic_link_pages_args()
{
$post = $this->factory->post->create_and_get(array('post_content' => 'Page 0<!--nextpage-->Page 1<!--nextpage-->Page 2<!--nextpage-->Page 3'));
setup_postdata($post);
$content = wp_link_pages(array('before' => sprintf('<nav class="page-link">%s', __('Pages:', 'thematic')), 'after' => '</nav>', 'echo' => '0'));
$this->assertRegexp('/^<nav/', $content);
}
开发者ID:scottnix,项目名称:Thematic,代码行数:7,代码来源:test-content-extensions.php
示例8: mh_posts_pagination
function mh_posts_pagination($content)
{
if (is_singular() && is_main_query()) {
$content .= wp_link_pages(array('before' => '<div class="pagination">', 'after' => '</div>', 'link_before' => '<span class="pagelink">', 'link_after' => '</span>', 'nextpagelink' => __('»', 'mh'), 'previouspagelink' => __('«', 'mh'), 'pagelink' => '%', 'echo' => 0));
}
return $content;
}
开发者ID:arkosoft,项目名称:sitoweb-sadmin,代码行数:7,代码来源:functions.php
示例9: argent_custom_link_pages
/**
* Display page-links for paginated posts before Jetpack share buttons and related posts.
*/
function argent_custom_link_pages($content)
{
if (is_singular() && is_main_query()) {
$content .= wp_link_pages(array('before' => '<div class="page-links"><span class="page-links-title">' . esc_html__('Pages:', 'argent') . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>', 'echo' => 0));
}
return $content;
}
开发者ID:nitaibezerra,项目名称:Argent-Neue,代码行数:10,代码来源:extras.php
示例10: tarski_link_pages
/**
* Passes some Tarski-specific arguments to wp_link_pages.
*
* @since 2.0
*
* @uses wp_link_pages
*/
function tarski_link_pages()
{
$arguments = array('before' => '<p class="link-pages"><strong>' . __('Pages:', 'tarski') . '</strong>', 'after' => '</p>', 'next_or_number' => 'number', 'nextpagelink' => __('Next page', 'tarski'), 'previouspagelink' => __('Previous page', 'tarski'), 'pagelink' => '%', 'more_file' => '', 'echo' => true);
if (!(has_post_format('aside') || in_category(get_tarski_option('asidescategory')))) {
wp_link_pages($arguments);
}
}
开发者ID:aleksking,项目名称:sherrill,代码行数:14,代码来源:content_helper.php
示例11: bizz_post_content_query
/**
* POST CONTENT - query posts
*
* output post content for Query Posts widget, based on predefined arguments
* @since 7.0
*/
function bizz_post_content_query($args = '', $post_count = false)
{
global $wp_query, $post, $opt;
bizz_hook_before_post($post_count);
#hook
echo "<" . apply_filters('bizz_html5_section', "div") . " class=\"format_text\">\n";
$selflink = isset($args['thumb_selflink']) && $args['thumb_selflink'] == true ? true : false;
$cropp = isset($args['thumb_cropp']) && $args['thumb_cropp'] != '' ? $args['thumb_cropp'] : 'c';
if (isset($opt['bizzthemes_thumb_show']['value']) && $args['thumb_display']) {
bizz_image('width=' . $args['thumb_width'] . '&height=' . $args['thumb_height'] . '&class=thumbnail ' . $args['thumb_align'] . '&cropp=' . $cropp . '&selflink=' . $selflink . '&filter=' . $args['thumb_filter'] . '&sharpen=' . $args['thumb_sharpen'] . '');
}
if ($args['remove_posts'] == '0') {
if ($args['full_posts'] == '0' && (is_archive() || $wp_query->is_posts_page || is_search() || is_home())) {
the_excerpt();
if ($args['read_more']) {
echo apply_filters('bizz_read_more', '<span class="read-more"><a href="' . get_permalink() . '" class="url fn" rel="nofollow">' . $args['read_more_text'] . '</a></span>');
}
} else {
the_content($args['read_more_text']);
}
wp_link_pages(array('before' => '<div class="page-link">', 'after' => '</div>'));
}
echo '<div class="fix"><!----></div>';
echo "</" . apply_filters('bizz_html5_section', "div") . ">\n";
bizz_hook_after_post($post_count);
#hook
}
开发者ID:loevendahl,项目名称:flexbil,代码行数:33,代码来源:frame_html_content.php
示例12: lightseek_link_pages
function lightseek_link_pages()
{
global $post;
if (is_single()) {
if (function_exists('wp_pagenavi')) {
wp_pagenavi(array('type' => 'multipart'));
} else {
wp_link_pages(array('before' => '<div class="page-links">' . esc_html__('Pages:', '_lightseek'), 'after' => '</div>'));
}
}
}
开发者ID:amielucha,项目名称:lightseek,代码行数:11,代码来源:template-tags.php
示例13: shop_isle_post_content
/**
* Display the post content with a link to the single post
* @since 1.0.0
*/
function shop_isle_post_content()
{
?>
<div class="post-entry" itemprop="articleBody">
<?php
the_content(sprintf(__('Continue reading %s', 'shop-isle'), '<span class="screen-reader-text">' . get_the_title() . '</span>'));
wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'shop-isle'), 'after' => '</div>'));
?>
</div><!-- .entry-content -->
<?php
}
开发者ID:monsteryu,项目名称:studioyen,代码行数:15,代码来源:post.php
示例14: content
public function content()
{
?>
<div class="entry-content" itemprop="articleBody">
<?php
eighteen_tags_post_thumbnail('full');
$this->blog_content();
wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'eighteen-tags'), 'after' => '</div>'));
?>
</div><!-- .entry-content -->
<?php
}
开发者ID:pootlepress,项目名称:18-tags,代码行数:12,代码来源:class-content-styles.php
示例15: eighteen_tags_post_content
/**
* Display the post content with a link to the single post
* @since 1.0.0
*/
function eighteen_tags_post_content()
{
?>
<div class="entry-content" itemprop="articleBody">
<?php
eighteen_tags_post_thumbnail('full');
the_content(sprintf(__('Continue reading %s', 'eighteen-tags'), '<span class="screen-reader-text">' . get_the_title() . '</span>'));
wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'eighteen-tags'), 'after' => '</div>'));
?>
</div><!-- .entry-content -->
<?php
}
开发者ID:pootlepress,项目名称:18-tags,代码行数:16,代码来源:post.php
示例16: actions_post_content
/**
* Display the post content with a link to the single post
* @since 1.0.0
*/
function actions_post_content()
{
if (is_search()) {
?>
<header class="page-header">
<h1 class="page-title"><?php
printf(__('Search Results for: %s', 'actions'), '<span>' . esc_html(get_search_query()) . '</span>');
?>
</h1>
</header><!-- .page-header -->
<?php
}
while (have_posts()) {
the_post();
?>
<article id="post-<?php
the_ID();
?>
" <?php
post_class();
?>
>
<?php
actions_post_header();
?>
<div class="entry-content">
<?php
actions_post_thumbnail('full');
if ('post' == get_post_type()) {
?>
<div class="entry-meta">
<?php
actions_posted_on();
?>
</div>
<?php
}
if (is_search()) {
the_excerpt();
} else {
the_content(sprintf(__('Continue reading %s', 'actions'), '<span class="screen-reader-text">' . esc_url(get_the_title()) . '</span>'));
}
wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'actions'), 'after' => '</div>'));
//actions_entry_footer();
?>
</div><!-- .entry-content -->
</article><!-- #post-## -->
<?php
}
}
开发者ID:WPDevHQ,项目名称:actions,代码行数:57,代码来源:post.php
示例17: Article_Content
function Article_Content()
{
?>
<div class="article__content">
<?php
the_content();
wp_link_pages(array('before' => '<div class="page-links">' . esc_html__('Pages:', 'bemmy'), 'after' => '</div>'));
?>
</div>
<?php
}
开发者ID:gios-asu,项目名称:bemmy-wordpress-theme,代码行数:12,代码来源:Content.php
示例18: wtf_paginate
/**
* Pagination template tag.
*/
function wtf_paginate($title = '', $class = '')
{
$output = '';
/* Posts page pagination. */
if (!is_singular() && wtf_is_paginated()) {
$output = '<nav class="pagination ' . $class . '" role="navigation">' . '<h1 class="visuallyhidden">' . $title . '</h1>' . get_next_posts_link(__('← Earlier posts', 'wtf')) . get_previous_posts_link(__('Newer posts →', 'wtf')) . '</nav>' . "\n";
/* Singular posts and pages pagination. */
} elseif (is_singular() && wtf_is_paginated()) {
$args = array('before' => '', 'after' => '', 'next_or_number' => 'next', 'nextpagelink' => __('Next page →', 'wtf'), 'previouspagelink' => __('← Previous page', 'wtf'), 'echo' => 0);
$output = '<nav class="pagination ' . $class . '" role="navigation">' . '<h1 class="visuallyhidden">' . $title . '</h1>' . wp_link_pages($args) . '</nav>' . "\n";
}
echo $output;
}
开发者ID:em222iv,项目名称:wordpress,代码行数:16,代码来源:template.php
示例19: storefront_page_content
/**
* Display the post content with a link to the single post
* @since 1.0.0
*/
function storefront_page_content()
{
?>
<div class="entry-content" itemprop="mainContentOfPage">
<?php
the_content();
?>
<?php
wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'storefront'), 'after' => '</div>'));
?>
</div><!-- .entry-content -->
<?php
}
开发者ID:chillinhen,项目名称:up2you-storefront,代码行数:17,代码来源:page.php
示例20: storefront_post_content
/**
* Display the post content
* PBO: options for featured image
*/
function storefront_post_content()
{
?>
<div class="entry-content" itemprop="articleBody">
<?php
if (pbosfc_get_option('post_featured_image_size') != 'none') {
storefront_post_thumbnail(pbosfc_get_option('post_featured_image_size'));
}
the_content(sprintf(__('Continue reading %s', 'storefront'), '<span class="screen-reader-text">' . get_the_title() . '</span>'));
wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'storefront'), 'after' => '</div>'));
?>
</div><!-- .entry-content -->
<?php
}
开发者ID:boguslawski-piotr,项目名称:pbo-storefront-compact,代码行数:18,代码来源:post.php
注:本文中的wp_link_pages函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论