• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP the_author_link函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: bfa_postinfo


//.........这里部分代码省略.........
        $postinfo = str_replace("%author-nickname%", $author_nickname, $postinfo);
    }
    // Author ID
    if (strpos($postinfo_string, '%author-id%') !== FALSE) {
        ob_start();
        the_author_meta('ID');
        $author_ID = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-id%", $author_ID, $postinfo);
    }
    // Author email address, clear text in HTML source code
    if (strpos($postinfo_string, '%author-email-clear%') !== FALSE) {
        ob_start();
        the_author_meta('email');
        $author_email_clear = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-email-clear%", $author_email_clear, $postinfo);
    }
    // Author email address obfuscated
    if (strpos($postinfo_string, '%author-email%') !== FALSE) {
        $postinfo = str_replace("%author-email%", antispambot(get_the_author_email()), $postinfo);
    }
    // Author website URL
    if (strpos($postinfo_string, '%author-url%') !== FALSE) {
        ob_start();
        the_author_meta('url');
        $author_url = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-url%", $author_url, $postinfo);
    }
    // Author website link
    if (strpos($postinfo_string, '%author-link%') !== FALSE) {
        ob_start();
        the_author_link();
        $author_link = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-link%", $author_link, $postinfo);
    }
    // Author posts archive link
    if (strpos($postinfo_string, '%author-posts-link%') !== FALSE) {
        ob_start();
        the_author_posts_link();
        $author_posts_link = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-posts-link%", $author_posts_link, $postinfo);
    }
    //  LEGACY: %author-linked% replaced by %author-posts-link% in 3.3.2, but displays the same: Author posts archive link
    if (strpos($postinfo_string, '%author-linked%') !== FALSE) {
        ob_start();
        the_author_posts_link();
        $author_posts_link = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-linked%", $author_posts_link, $postinfo);
    }
    // Author post count
    if (strpos($postinfo_string, '%author-post-count%') !== FALSE) {
        ob_start();
        the_author_posts();
        $author_post_count = ob_get_contents();
        ob_end_clean();
        $postinfo = str_replace("%author-post-count%", $author_post_count, $postinfo);
    }
    // Author AOL Instant Messenger screenname
    if (strpos($postinfo_string, '%author-aim%') !== FALSE) {
        ob_start();
        the_author_meta('aim');
开发者ID:aagivecamp,项目名称:FlintRiver,代码行数:67,代码来源:bfa_postinfo.php


示例17: ht_author_bio

    function ht_author_bio()
    {
        ?>
    <div id="author-info">
        <div class="border-style">
            <div class="inner"><span class="fl"><?php 
        echo get_avatar(get_the_author_meta('email'), '60');
        ?>
</span>
                <p>
                    <strong class="author-name">
                        <?php 
        the_author_link();
        ?>
                    </strong>
                    <?php 
        if (get_the_author_meta('description') == '') {
            echo __('The author didn\'t add any Information to his profile yet. ', 'highthemes');
        } else {
            the_author_meta('description');
        }
        ?>
                </p>
                <div class="fix"></div>
            </div>
        </div>
    </div>
        <?php 
    }
开发者ID:naffan2014,项目名称:greenhomeland,代码行数:29,代码来源:functions.php


示例18: pego_get_author_data

function pego_get_author_data($post)
{
    ?>
	<!--BEGIN .author-bio-->
	<div class="clear"></div>
	<div class="author-bio">
				<?php 
    echo get_avatar(get_the_author_meta('email'), '90');
    ?>
	<div class="author-info">
	<ul class="author-socials">
		<?php 
    if (get_the_author_meta('user_url', $post->post_author) != '') {
        echo '<li><a title="WebSite" href="' . get_the_author_meta('user_url', $post->post_author) . '" class="icons-author-socials icon-home"></a></li>';
    }
    if (get_the_author_meta('facebook', $post->post_author) != '') {
        echo '<li><a title="Facebook" href="' . get_the_author_meta('facebook', $post->post_author) . '" class="icons-author-socials icon-facebook"></a></li>';
    }
    if (get_the_author_meta('twitter', $post->post_author) != '') {
        echo '<li><a title="Twitter"  href="' . get_the_author_meta('twitter', $post->post_author) . '" class="icons-author-socials icon-twitter"></a></li>';
    }
    if (get_the_author_meta('googleplus', $post->post_author) != '') {
        echo '<li><a title="Google Plus" href="' . get_the_author_meta('googleplus', $post->post_author) . '" class="icons-author-socials icon-gplus"></a></li>';
    }
    if (get_the_author_meta('linkedin', $post->post_author) != '') {
        echo '<li><a title="LinkedIn" href="' . get_the_author_meta('linkedin', $post->post_author) . '" class="icons-author-socials icon-linkedin"></a></li>';
    }
    if (get_the_author_meta('mail', $post->post_author) != '') {
        echo '<li><a title="Mail" href="' . get_the_author_meta('mail', $post->post_author) . '" class="icons-author-socials icon-mail"></a></li>';
    }
    ?>
	</ul>
	
	<h3 class="author-title">
	<?php 
    if (function_exists('ot_get_option')) {
        if (ot_get_option('meganews_written_by_caption') != '') {
            echo ot_get_option('meganews_written_by_caption') . ' ';
        }
    }
    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:ImtiH,项目名称:BAPWD,代码行数:53,代码来源:functions.php


示例19: the_link

    the_link();
    ?>
"><?php 
    the_title();
    ?>
</a></h4>
	<div class="entry">
	<div class="content">
		<?php 
    the_content();
    ?>
	</div>

<p class="date">
<?php 
    the_author_link('before=by &after= at ');
    ?>
<a href="<?php 
    the_link();
    ?>
"><?php 
    the_time('format=F d, Y h:i A');
    ?>
</a><!--<TMPL_IF category> under <TMPL_VAR category></TMPL_IF>-->
</p>
</div>
</div>
<?php 
    $notfirst = true;
}
?>
开发者ID:rmccue,项目名称:Lilina,代码行数:31,代码来源:index.php


示例20: padd_theme_widget_popular_posts

/**
 * Displays the modified list of popular posts.
 **/
function padd_theme_widget_popular_posts($limit = 5, $range = 'all', $order_by = 'comment_count')
{
    global $wpdb;
    $table = $wpdb->prefix . "popularpostsdata";
    $nopages = "AND {$wpdb->posts}.post_type = 'post'";
    // Range options
    switch ($range) {
        case 'all':
            $range = "post_date_gmt < '" . gmdate("Y-m-d H:i:s") . "'";
            break;
        case 'yesterday':
            $range = $table . "cache.day >= '" . gmdate("Y-m-d") . "' - INTERVAL 1 DAY";
            break;
        case 'daily':
            $range = $table . "cache.day = CURDATE()";
            break;
        case 'weekly':
            $range = $table . "cache.day >= '" . gmdate("Y-m-d") . "' - INTERVAL 7 DAY";
            break;
        case 'monthly':
            $range = $table . "cache.day >= '" . gmdate("Y-m-d") . "' - INTERVAL 30 DAY";
            break;
        default:
            $range = "post_date_gmt < '" . gmdate("Y-m-d H:i:s") . "'";
            break;
    }
    // Sorting options
    switch ($instance['order_by']) {
        case 'comments':
            $sortby = 'comment_count';
            break;
        case 'views':
            $sortby = 'pageviews';
            break;
        case 'avg':
            $sortby = 'avg_views';
            break;
        default:
            $sortby = 'comment_count';
            break;
    }
    if ($instance['range'] == 'all') {
        $join = "LEFT JOIN {$table} ON {$wpdb->posts}.ID = {$table}.postid ";
        $force_pv = "AND " . $table . ".pageviews > 0 ";
    } else {
        $join = "RIGHT JOIN " . $table . "cache ON {$wpdb->posts}.ID = " . $table . "cache.id ";
        $force_pv = "";
    }
    $fields .= ", {$wpdb->posts}.comment_count AS 'comment_count' ";
    $mostpopular = $wpdb->get_results("SELECT {$wpdb->posts}.ID, {$wpdb->posts}.post_title {$fields} FROM {$wpdb->posts} {$join} WHERE {$wpdb->posts}.post_status = 'publish' AND {$wpdb->posts}.post_password = '' AND {$range} {$force_pv} {$nopages} {$exclude} GROUP BY {$wpdb->posts}.ID ORDER BY {$sortby} DESC LIMIT " . $limit . "");
    if (!is_array($mostpopular) || empty($mostpopular)) {
        echo '<p>' . __('Sorry. No data so far.', 'wordpress-popular-posts') . '</p>';
    } else {
        foreach ($mostpopular as $post) {
            $comments = '';
            $count = (int) $post->comment_count;
            if ($count > 1) {
                $comments = $count . ' comments';
            } else {
                if ($count == 1) {
                    $comments = '1 comment';
                } else {
                    $comments = 'no comments';
                }
            }
            ?>
	
			<div class="popular-post">
				<h3><a href="<?php 
            echo get_permalink($post->ID);
            ?>
 " title="Permalink to <?php 
            echo $post->post_title;
            ?>
"><?php 
            echo $post->post_title;
            ?>
</a></h3>
				<div class="met 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP the_author_meta函数代码示例发布时间:2022-05-23
下一篇:
PHP the_author_description函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap