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


PHP the_author_link函数代码示例

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


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

示例1: categori_news

        function categori_news(){
            query_posts('cat=9&showposts=10&posts_per_page=3');

            while (have_posts()) : the_post();
                /*Dima insert*/the_excerpt(); ?>
                <div class="content-box">
                    <div class="bgr01"><div class="bgr02"><div class="bgr03">
                                <div <?php post_class() ?> id="post-<?php the_ID(); ?>" style=" float:none; ">
                                    <div class="title">
                                        <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
                                        <div class="date_all">
                                            <?php the_time('l, j ?F, Y') ?>
                                        </div>
                                        <div class="post">
                                            Написал <?php the_author_link() ?> <?php the_time('g:i A') ?>
                                        </div>
                                    </div>
                                    <div class="content_box">
                                        <?php the_content('Читать всё'); ?>
                                    </div>

                                    <div class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?></div>

                                    <div class="comments"><?php comments_popup_link('0 комментарии', 'комментарии', '% комментарии '); ?></div>
                                    <div class="link-edit"><?php edit_post_link('Edit', ''); ?></div>
                                </div>
                            </div></div></div>
                </div>
            <?php endwhile;}
开发者ID:xronn01,项目名称:www.prosvitcenter.org,代码行数:29,代码来源:myfunk.php

示例2: maxitheme_author

function maxitheme_author()
{
    echo '<div class="entry-meta"><span class="vcard author">';
    echo esc_html__('by ', 'maxitheme');
    echo '<span class="fn" itemprop="name">';
    echo the_author_link();
    echo '</span></span></div>';
}
开发者ID:dqishmirian,项目名称:jrrny,代码行数:8,代码来源:utility.php

示例3: widget

    function widget($args, $instance)
    {
        extract($args);
        echo $before_widget;
        ?>
			<div class="widget">
				<h4><?php 
        echo apply_filters('widget_title', $instance['heading']);
        ?>
</h4>
				<?php 
        $the_query = new WP_Query('posts_per_page=5');
        ?>
				<?php 
        while ($the_query->have_posts()) {
            $the_query->the_post();
            ?>
					<article class="post-thumb">
						<?php 
            if (has_post_thumbnail()) {
                echo '<figure><a href="', the_permalink(), '">';
                the_post_thumbnail(array(80, ''), array('class' => 'img-responsive'));
                echo '</a></figure>';
            }
            ?>
						<div class="body">
							<h5 class="title"><a href="<?php 
            the_permalink();
            ?>
"><?php 
            the_title();
            ?>
</a></h5>
							<p class="meta">						
								<span class="author"><a href="<?php 
            the_author_link();
            ?>
"><?php 
            the_author();
            ?>
</a></span>
								<span class="date"><?php 
            the_time('d.m.Y');
            ?>
</span>
							</p>
						</div>
					</article>
				<?php 
        }
        wp_reset_postdata();
        ?>
			</div>				
		<?php 
        echo $after_widget;
    }
开发者ID:juhando,项目名称:zen,代码行数:56,代码来源:most-recent-posts.php

示例4: elitepress_post_meta_content

    function elitepress_post_meta_content()
    {
        ?>
   
	        <!--show date of post-->
			
			<div class="blog-post-info-detail">
				<span class="blog_tags">
						<?php 
        _e('By', 'elitepress');
        ?>
<a href="<?php 
        echo get_author_posts_url(get_the_author_meta('ID'));
        ?>
"><?php 
        the_author_link();
        ?>
</a>
								
						<?php 
        _e('On', 'elitepress');
        ?>
<a href="<?php 
        the_permalink();
        ?>
"><?php 
        echo get_the_date();
        ?>
</a>
								
						<?php 
        $tag_list = get_the_tag_list();
        if (!empty($tag_list)) {
            ?>
						<div class="blog-tags"><?php 
            _e('In', 'elitepress');
            the_tags('', ', ', '');
            ?>
,<?php 
            $cat_list = get_the_category_list();
            if (!empty($cat_list)) {
                the_category(', ');
            }
            ?>
						</div><?php 
        }
        ?>
				</span>
			</div>
			
			
			<?php 
    }
开发者ID:Kemitestech,项目名称:WordPress-Skeleton,代码行数:53,代码来源:template-tag.php

示例5: ace_post_author

function ace_post_author()
{
    if (get_option('ace_blog_author')) {
    } else {
        echo '<li class="post-author">';
        echo '<span>Author:</span>';
        echo ' <span class="vcard author" itemprop="author" itemscope="itemscope" itemtype="http://schema.org/Person"><span class="fn" itemprop="name" style="font-weight:400; text-transform:capitalize;">';
        the_author_link();
        echo '</span></span>';
        echo '</li>';
    }
}
开发者ID:jonisthere,项目名称:sora,代码行数:12,代码来源:ace_functions.php

示例6: get_template_title

function get_template_title()
{
    $title = '';
    ob_start();
    _e('Author Archives', 'blankslate');
    $title .= ob_get_contents();
    ob_clean();
    $title .= ': ';
    the_author_link();
    $title .= ob_get_contents();
    ob_end_clean();
    return $title;
}
开发者ID:Troposphir,项目名称:troposphir,代码行数:13,代码来源:author.php

示例7: portland_post_meta

/**
 * Displays post meta based on $meta_data
 *
 * @since 1.0.0
 * @param array $meta_data Array of meta data to display.
 * @param array $args Array of display settings.
 */
function portland_post_meta($meta_data = array(), $args = array())
{
    $defaults = array('class_name' => '', 'separator' => '&bull;', 'display_titles' => true);
    $args = array_merge($defaults, $args);
    echo '<div class="portland-meta ' . $args['class_name'] . '">';
    if (!empty($meta_data)) {
        $display_separator = false;
        foreach ($meta_data as $meta) {
            switch ($meta) {
                case 'author':
                    if ($display_separator) {
                        echo '<span class="portland-meta-separator"> ' . $args['separator'] . ' </span>';
                    }
                    echo '<span class="meta author-wrap">';
                    if ($args['display_titles']) {
                        _e('By ', 'portland_textdomain');
                    }
                    echo '<span class="author">';
                    the_author();
                    echo '</span>';
                    echo '</span> ';
                    $display_separator = true;
                    break;
                case 'author_website':
                    if ($display_separator) {
                        echo '<span class="portland-meta-separator"> ' . $args['separator'] . ' </span>';
                    }
                    echo '<span class="meta author-wrap">';
                    if ($args['display_titles']) {
                        _e('By ', 'portland_textdomain');
                    }
                    echo '<span class="author">';
                    the_author_link();
                    echo '</span>';
                    echo '</span> ';
                    $display_separator = true;
                    break;
                case 'author_posts':
                    if ($display_separator) {
                        echo '<span class="portland-meta-separator"> ' . $args['separator'] . ' </span>';
                    }
                    echo '<span class="meta author-wrap">';
                    if ($args['display_titles']) {
                        _e('By ', 'portland_textdomain');
                    }
                    echo '<span class="author">';
                    the_author_posts_link();
                    echo '</span>';
                    echo '</span> ';
                    $display_separator = true;
                    break;
                case 'categories':
                    if (has_category()) {
                        if ($display_separator) {
                            echo '<span class="portland-meta-separator"> ' . $args['separator'] . ' </span>';
                        }
                        echo '<span class="meta categories-wrap">';
                        if ($args['display_titles']) {
                            _e('Posted in: ', 'portland_textdomain');
                        }
                        echo '<span class="categories">';
                        the_category(', ');
                        echo '</span>';
                        echo '</span> ';
                        $display_separator = true;
                    }
                    break;
                case 'date':
                    if ($display_separator) {
                        echo '<span class="portland-meta-separator"> ' . $args['separator'] . ' </span>';
                    }
                    echo '<span class="meta date-wrap">';
                    if ($args['display_titles']) {
                        _e('Published: ', 'portland_textdomain');
                    }
                    echo '<span class="date">';
                    the_time(get_option('date_format'));
                    echo '</span>';
                    echo '</span> ';
                    $display_separator = true;
                    break;
                case 'tags':
                    if ($display_separator) {
                        echo '<span class="portland-meta-separator"> ' . $args['separator'] . ' </span>';
                    }
                    echo '<span class="meta tags-wrap">';
                    if ($args['display_titles']) {
                        the_tags(__('Tags: ', 'portland_textdomain'));
                    } else {
                        the_tags();
                    }
                    echo '</span> ';
                    $display_separator = true;
//.........这里部分代码省略.........
开发者ID:aaronjamesyoung,项目名称:portland,代码行数:101,代码来源:helpers.php

示例8: sensei_lesson_meta

    public function sensei_lesson_meta($post_id = 0)
    {
        global $post, $woothemes_sensei;
        if (0 < intval($post_id)) {
            $lesson_course_id = absint(get_post_meta($post_id, '_lesson_course', true));
            ?>
<section class="entry">
            <p class="sensei-course-meta">
			    <?php 
            if (isset($woothemes_sensei->settings->settings['lesson_author']) && $woothemes_sensei->settings->settings['lesson_author']) {
                ?>
			    <span class="course-author"><?php 
                _e('by ', 'woothemes-sensei');
                the_author_link();
                ?>
</span>
			    <?php 
            }
            ?>
                <?php 
            if (0 < intval($lesson_course_id)) {
                ?>
                <span class="lesson-course"><?php 
                echo '&nbsp;' . sprintf(__('Part of: %s', 'woothemes-sensei'), '<a href="' . esc_url(get_permalink($lesson_course_id)) . '" title="' . esc_attr(apply_filters('sensei_view_course_text', __('View course', 'woothemes-sensei'))) . '"><em>' . get_the_title($lesson_course_id) . '</em></a>');
                ?>
</span>
                <?php 
            }
            ?>
            </p>
            <p class="lesson-excerpt"><?php 
            echo apply_filters('get_the_excerpt', $post->post_excerpt);
            ?>
</p>
		</section><?php 
        }
        // End If Statement
    }
开发者ID:Ezyva2015,项目名称:opendooronline.com.au,代码行数:38,代码来源:class-woothemes-sensei-frontend.php

示例9: get_entry_meta

    function get_entry_meta()
    {
        ?>
        <p class="entry-meta"><span class="glyphicon glyphicon-time"></span> Posted by <a class="author" href="<?php 
        the_author_link();
        ?>
"><?php 
        the_author();
        ?>
</a>
            <?php 
        if (the_date()) {
            ?>
                on <?php 
            the_date();
            ?>
            <?php 
        }
        ?>
            <?php 
        printf(__('<span class="category"> in %1$s</span>', 'notebook'), get_the_category_list(', '));
        ?>
            <?php 
        if (comments_open()) {
            echo ' | <span class="comments">';
            comments_popup_link(__('Leave a comment', 'notebook'), __('One comment', 'notebook'), __('% comments', 'notebook'), __('Read all comments', 'notebook'));
            echo '</span>';
        }
        ?>
        </p>
        <hr>
    <?php 
    }
开发者ID:ansidev,项目名称:wp-notebook-theme,代码行数:33,代码来源:functions.php

示例10: pego_get_author_data

function pego_get_author_data($post)
{
    ?>
	<!--BEGIN .author-bio-->
	<h1>About author</h1>
	<div class="clear"></div>
	<div class="author-bio">
				<?php 
    echo get_avatar(get_the_author_meta('email'), '90');
    ?>
	<div class="author-info">
	<h3 class="author-title"><?php 
    the_author_link();
    ?>
</h3>
	<p class="author-description"><?php 
    the_author_meta('description');
    ?>
	</div>
	<!--END .author-bio-->
	<div class="clear"></div>
	</div>
	<div class="clear"></div>
	<?php 
}
开发者ID:EmreKarahan,项目名称:wordpress,代码行数:25,代码来源:functions.php

示例11: wp_ajax_query


//.........这里部分代码省略.........
                        <a href="<?php 
                echo get_permalink();
                ?>
" title="<?php 
                the_title();
                ?>
">
                        <?php 
                the_title();
                ?>
                        </a>
                      </h2>
                      <br />
                      <?php 
            }
            ?>
                      <?php 
            if ($atts['post_meta_size']) {
                ?>
                      <div class="ajax-item-meta">
                        <?php 
                if (is_plugin_active('woocommerce/woocommerce.php') && $atts['post_type'] == 'product') {
                    //woo product
                    $product = new WC_Product(get_the_ID());
                    ?>
                        <span><?php 
                    echo $product->get_price_html();
                    ?>
 &nbsp;&nbsp;<a href="<?php 
                    echo do_shortcode('[add_to_cart_url id="' . get_the_ID() . '"]');
                    ?>
" title="<?php 
                    _e('Add to cart', 'leafcolor');
                    ?>
"><i class="fa fa-shopping-cart"></i>+</a></span>
                        <?php 
                } else {
                    ?>
                        <span><i class="fa fa-clock-o"></i> <?php 
                    the_time(get_option('date_format'));
                    ?>
 &nbsp;&nbsp;<i class="fa fa-user"></i> <?php 
                    the_author_link();
                    ?>
</span>
                        <?php 
                }
                ?>
                      </div>
                      <br />
                      <?php 
            }
            ?>
                      <?php 
            if ($atts['post_excerpt_size']) {
                ?>
                      <div class="ajax-item-content">
                        <?php 
                if ($atts['full_post'] == 1) {
                    the_content();
                } elseif ($atts['fullpost'] == -1) {
                    echo '';
                } else {
                    the_excerpt();
                }
                ?>
                      </div>
                      <?php 
            }
            ?>
                    </div>
                    <div class="clear"></div>
                </div>
            </div>
			<?php 
        }
        wp_reset_postdata();
        if ($atts['layout'] == 'classic') {
            echo '</div>';
        }
        //fix firefox append
        $html = ob_get_clean();
        if ($is_ajax == 1) {
            echo $html;
            exit;
        }
        remove_filter('excerpt_length', 'waq_custom_excerpt_length');
        return $html;
    } else {
        if ($is_ajax == 1) {
            echo '-11';
            exit;
        }
        remove_filter('excerpt_length', 'waq_custom_excerpt_length');
        return 'No post';
    }
    if ($atts['multisite']) {
        restore_current_blog();
    }
}
开发者ID:webtechfreaky,项目名称:quick-ajax-modern-wordpress-ajax-query-posts,代码行数:101,代码来源:wp-ajax-query-shortcode.php

示例12: thim_about_author

/**
* About the author
*/
function thim_about_author()
{
    if (!is_singular('post')) {
        return;
    }
    ?>
	<div class="thim-about-author">
		<div class="author-wrapper">
			<div class="author-avatar">
				<?php 
    echo get_avatar(get_the_author_meta('email'), 90);
    ?>
			</div>
			<div class="author-details">
				<div class="author-bio">
					<p class="name">
						<?php 
    the_author_link();
    ?>
						<?php 
    if (get_the_author_meta('job')) {
        ?>
							<br/><span class="job"><i><?php 
        echo get_the_author_meta('job');
        ?>
</i></span>
						<?php 
    }
    ?>
					</p>
					<p class="description"><?php 
    echo get_the_author_meta('description');
    ?>
</p>

					<?php 
    if (get_the_author_meta('user_url')) {
        ?>
						<p class="url"><?php 
        _e('Website: ', 'mabu');
        ?>
<a href="<?php 
        echo get_the_author_meta('user_url');
        ?>
" target="_blank"><?php 
        echo get_the_author_meta('user_url');
        ?>
</a></p>
					<?php 
    }
    ?>
				</div>
			</div>
		</div>
	</div>
	<?php 
}
开发者ID:vinhnq1211,项目名称:funy,代码行数:60,代码来源:custom-functions.php

示例13: the_post_metas

function the_post_metas()
{
    $meta = [];
    if (valid_meta(the_date_link())) {
        array_push($meta, the_date_link());
    }
    if (valid_meta(the_author_link())) {
        array_push($meta, the_author_link());
    }
    if (valid_meta(the_category())) {
        array_push($meta, the_category());
    }
    if (valid_meta(get_the_tag_list())) {
        array_push($meta, get_the_tag_list());
    }
    return implode(" | ", $meta);
}
开发者ID:arnaudlewis,项目名称:php-websitestarter-virtuoso,代码行数:17,代码来源:document.php

示例14: widget

    /**
     * Front-end display of widget.
     *
     * @see WP_Widget::widget()
     *
     * @param array $args     Widget arguments.
     * @param array $instance Saved values from database.
     */
    public function widget($args, $instance)
    {
        if (!empty($instance['title'])) {
            echo $args['before_title'] . apply_filters('widget_title', $instance['title']) . $args['after_title'];
        }
        ?>
		<aside class="widget sidebar-author">
			<div class="sidebar-author-img">
			<?php 
        $author_email = get_the_author_meta('email');
        echo get_avatar($author_email, '80');
        ?>
			</div>
			
			<span>by <?php 
        the_author_link();
        ?>
</span>
			<p><?php 
        the_author_meta('description');
        ?>
</p>

			<!-- author social -->
			<ul>
				<?php 
        if (get_the_author_meta('user_url')) {
            echo '<li><a title="homepage" target="_blank" rel="nofollow" href="' . get_the_author_meta('user_url') . '"><span class="iconfont icon-blhome"></span></a></li>';
        }
        if (get_the_author_meta('weibo')) {
            echo '<li><a title="weibo" target="_blank" rel="nofollow" href="' . get_the_author_meta('weibo') . '"><span class="iconfont icon-iconweibo"></span></a></li>';
        }
        if (get_the_author_meta('github')) {
            echo '<li><a title="github" target="_blank" rel="nofollow" href="' . get_the_author_meta('github') . '"><span class="iconfont icon-github"></span></a></li>';
        }
        if (get_the_author_meta('twitter')) {
            echo '<li><a title="twitter" target="_blank" rel="nofollow" href="' . get_the_author_meta('twitter') . '"><span class="iconfont icon-twitter"></span></a></li>';
        }
        if (get_the_author_meta('google')) {
            echo '<li><a title="google+" target="_blank" rel="nofollow" href="' . get_the_author_meta('google') . '"><span class="iconfont icon-google"></span></a></li>';
        }
        if (get_the_author_meta('facebook')) {
            echo '<li><a title="facebook" target="_blank" rel="nofollow" href="' . get_the_author_meta('facebook') . '"><span class="iconfont icon-facebook"></span></a></li>';
        }
        if (get_the_author_meta('email')) {
            echo '<li><a title="email" target="_blank" href="mailto:' . get_the_author_meta('email') . '"><span class="iconfont icon-email"></span></a></li>';
        }
        if (get_the_author_meta('douban')) {
            echo '<li><a title="douban" target="_blank" rel="nofollow" href="' . get_the_author_meta('douban') . '"><span class="iconfont icon-douban"></span></a></li>';
        }
        if (get_the_author_meta('linkedin')) {
            echo '<li><a title="linkedin" target="_blank" rel="nofollow" href="' . get_the_author_meta('linkedin') . '"><span class="iconfont icon-linkedin"></span></a></li>';
        }
        if (get_the_author_meta('alipay')) {
            echo '<li class="dropdown"><span class="iconfont icon-zhifufangshi dropdown-toggle" data-toggle="dropdown"></span><div class="dropdown-menu"><p>' . __('Dimensional code scanning alipay funding', 'pits') . '</p><img src="' . get_the_author_meta('alipay') . '"></div></li>';
        }
        if (get_the_author_meta('weixin')) {
            echo '<li class="dropdown"><span class="iconfont icon-weibiaoti1 dropdown-toggle" data-toggle="dropdown"></span><div class="dropdown-menu"><p>' . __('Dimensional code scanning weixin concern', 'pits') . '</p><img src="' . get_the_author_meta('weixin') . '"></div></li>';
        }
        ?>
			</ul>
		</aside>
<?php 
    }
开发者ID:mizhdi,项目名称:PITS,代码行数:72,代码来源:widget.php

示例15: wpmu_single_loop

function wpmu_single_loop()
{
    rewind_posts();
    while (have_posts()) {
        the_post();
        ?>
			<div class="post" id="post-<?php 
        the_ID();
        ?>
">
				<div class="post-content-wp">
					<h2 class="posttitle"><a href="<?php 
        the_permalink();
        ?>
" rel="bookmark" title="<?php 
        _e('Permanent Link to', 'product');
        ?>
 <?php 
        the_title_attribute();
        ?>
"><?php 
        the_title();
        ?>
</a></h2>
					<p class="date"><span class="byline"><?php 
        the_time('M j Y');
        ?>
 <?php 
        _e('in', 'product');
        ?>
 <?php 
        the_category(', ');
        ?>
 <em><?php 
        _e('by ', 'product');
        the_author_link();
        ?>
</em></span></p>
					<div class="entry">
						<?php 
        the_content();
        ?>
					</div>
					<p class="postmetadata"><span class="tags"><?php 
        the_tags(__('Tags: ', 'product'), ', ', '<br />');
        ?>
</span> <span class="comments"><?php 
        comments_popup_link(__('No Comments &#187;', 'product'), __('1 Comment &#187;', 'product'), __('% Comments &#187;', 'product'));
        ?>
</span></p>
				</div>
			</div>

			<?php 
        comments_template('', true);
        ?>
			<?php 
    }
}
开发者ID:JeffreyBue,项目名称:jb,代码行数:59,代码来源:loop-functions.php


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