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


PHP wp_link_pages函数代码示例

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


在下文中一共展示了wp_link_pages函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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">&rarr;</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">&rarr;</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' => __('&raquo;', 'mh'), 'previouspagelink' => __('&laquo;', '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


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