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


PHP the_tags函数代码示例

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


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

示例1: post_meta

function post_meta()
{
    ?>
	<ul class="post_meta">
		<li class="date"><?php 
    echo get_the_date();
    ?>
</li>
		<li class="category"><?php 
    the_category(', ');
    ?>
</li>
		<?php 
    $post_tags = wp_get_post_tags($post->ID);
    if (!empty($post_tags)) {
        ?>
				<li class="tags"><?php 
        the_tags('', ', ', '');
        ?>
</li>
			<?php 
    }
    ?>
	</ul><!-- .post-meta -->
<?php 
}
开发者ID:rigelstpierre,项目名称:Everlovin-Press,代码行数:26,代码来源:meta.php

示例2: magnificient_entry_meta

 function magnificient_entry_meta()
 {
     echo '<span class="byline author"><a href="' . get_author_posts_url(get_the_author_meta('ID')) . '" rel="author" class="fn">' . get_the_author() . '</a> • </span>';
     echo '<time class="updated" datetime="' . get_the_time('c') . '" pubdate><a href="' . get_permalink() . '">' . get_the_time('F jS, Y') . '</a> • </time>';
     echo '<span class="entry-category">' . the_category('&bull;') . '</span>';
     echo '<span class="entry-tags">' . the_tags(' • ', ' • ', '') . '</span>';
 }
开发者ID:ThemeJungles,项目名称:Magnificient_tutorial,代码行数:7,代码来源:entry-meta.php

示例3: matraman_lite_tags

function matraman_lite_tags()
{
    global $post;
    echo '<span class="tag-wrapper"><i class="icon icon-tags-round"></i>';
    the_tags('', ', ', '');
    echo '</span>';
}
开发者ID:ComEnYns,项目名称:Web-Projects,代码行数:7,代码来源:themeta.php

示例4: formatAttribute

    function formatAttribute()
    {
        global $post;
        ?>
        <ul class="post-in">
            <li>
                <?php 
        esc_html_e("Posted In  : ", "charity");
        the_category(" , ");
        $tags = get_tags();
        if (!empty($tags)) {
            the_tags(" , ");
        }
        ?>
            </li>
            <li>
                <a href="<?php 
        comments_link();
        ?>
"><?php 
        comments_number('0 : comment', '1 : comment', '% : comments');
        ?>
</a>
            </li>
        </ul>
        <?php 
    }
开发者ID:Angelpm28,项目名称:ong-canada,代码行数:27,代码来源:post-format-hooks.php

示例5: 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

示例6: tags_after_single_post_content

function tags_after_single_post_content($content)
{
    if (is_singular('post') && is_main_query()) {
        $tags = the_tags('<div class="entry-meta">Tagged with: ', '.', '</div><br />');
        $content .= $content . $tags;
    }
    return $content;
}
开发者ID:chsunil,项目名称:corp,代码行数:8,代码来源:functions.php

示例7: post_tag

 public function post_tag($atts)
 {
     ob_start();
     the_tags(' <span class="tf_post_tag">', ', ', '</span>');
     $output = ob_get_contents();
     ob_end_clean();
     return $output;
 }
开发者ID:jhostetter,项目名称:wp_intern_themes,代码行数:8,代码来源:post-meta.php

示例8: etiquetas_post

function etiquetas_post($atts)
{
    global $post;
    $tags = '<div class="etiquetas-entrada"><strong>ETIQUETAS:</strong> <span class="post-tags"></div>';
    ob_start();
    the_tags('<div class="etiquetas-entrada"><strong>ETIQUETAS:</strong> <span class="post-tags">', ', ', '</span></div>');
    $tags = ob_get_contents();
    ob_end_clean();
    return $tags;
}
开发者ID:hernandemczuk,项目名称:wordpressTheme,代码行数:10,代码来源:functions.php

示例9: diarjolite_after_content_function

/**
 * Wp in Progress
 * 
 * @package Wordpress
 * @author WPinProgress
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * It is also available at this URL: http://www.gnu.org/licenses/gpl-3.0.txt
 */
function diarjolite_after_content_function()
{
    if (is_home() || is_category() || is_search() || is_tag() || is_page() && get_post_type() != "page") {
        do_action('diarjolite_excerpt');
        ?>

        <div class="post-info">
            <div class="left"> <?php 
        echo get_the_date('m.d.Y');
        ?>
 </div>
            <div class="right"> <?php 
        the_category(', ');
        ?>
 </div>
        </div>
            
        <div class="clear"></div>

	<?php 
    } else {
        if (is_single()) {
            ?>

    	<div class="line"> <span> <?php 
            echo __("On ", "diarjolite") . get_the_date() . __(" by ", "diarjolite") . get_the_author();
            ?>
 </span> </div>

	<?php 
        }
        the_content();
        echo '<div class="clear"></div>';
        if (get_post_type() == "post") {
            ?>
        <div class="post-info">
            <div class="left"> <?php 
            the_category(', ');
            ?>
 </div>
            <div class="right"> <?php 
            the_tags('Tags: ', ', ', '');
            ?>
  </div>
        </div>
            
        <div class="clear"></div>

    <?php 
        }
    }
    ?>

<?php 
}
开发者ID:tlovett1,项目名称:tlcom-theme,代码行数:64,代码来源:after-content.php

示例10: 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

示例11: novalite_after_content_function

/**
 * Wp in Progress
 * 
 * @author WPinProgress
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * It is also available at this URL: http://www.gnu.org/licenses/gpl-3.0.txt
 */
function novalite_after_content_function()
{
    if (is_home() || is_category() || is_page()) {
        the_excerpt();
    } else {
        the_content();
        the_tags('<footer class="line"><span class="entry-info"><strong>' . __('Tags', 'novalite') . ':</strong> ', ', ', '</span></footer>');
        if (get_post_format()) {
            echo '<footer class="line"><span class="entry-info"><strong>' . __('Tipo de Post', 'novalite') . ':</strong> ' . ucfirst(get_post_format()) . '</span></footer>';
        }
        comments_template();
    }
}
开发者ID:lauraGasca,项目名称:Darkcy_Wordpress,代码行数:21,代码来源:after-content.php

示例12: wpbppost_meta

    function wpbppost_meta()
    {
        ?>

<ul class="post-meta inline-list">
  <li>
    Posted:
    <a href="<?php 
        echo get_day_link(get_post_time('Y'), get_post_time('m'), get_post_time('j'));
        ?>
">
      <?php 
        printf('<time datetime="%1$s">%2$s</time>', esc_attr(get_the_date('c')), esc_html(get_the_date()));
        ?>
    </a>
  </li>
  <li>
    <?php 
        the_tags('Tags: ', ', ', '');
        ?>
  </li>
  <li>
    <?php 
        $categories = get_the_category();
        $separator = ', ';
        $output = '';
        if (!empty($categories)) {
            foreach ($categories as $category) {
                $output .= '<a href="' . esc_url(get_category_link($category->term_id)) . '" alt="' . esc_attr(sprintf(__('View all posts in %s', 'textdomain'), $category->name)) . '">' . esc_html($category->name) . '</a>' . $separator;
            }
            echo 'Categories: ';
            echo trim($output, $separator);
        }
        ?>
  </li>
  <li>
    Author:
    <a href="<?php 
        echo esc_url(get_author_posts_url(get_the_author_meta('ID')));
        ?>
"><?php 
        echo get_the_author_meta('display_name');
        ?>
</a>
  </li>
</ul>

<?php 
    }
开发者ID:tgallimore,项目名称:wp-boilerplate,代码行数:49,代码来源:template-tags.php

示例13: novalite_after_content_function

/**
 * Wp in Progress
 * 
 * @author WPinProgress
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * It is also available at this URL: http://www.gnu.org/licenses/gpl-3.0.txt
 */
function novalite_after_content_function()
{
    if (is_home() || is_category() || is_page()) {
        the_excerpt();
    } else {
        the_content();
        the_tags('<footer class="line"><span class="entry-info"><strong>' . __('Tags', 'wip') . ':</strong> ', ', ', '</span></footer>');
        if (get_post_format()) {
            echo '<footer class="line"><span class="entry-info"><strong>' . __('Post type', 'wip') . ':</strong> ' . ucfirst(get_post_format()) . '</span></footer>';
        }
        if (novalite_setting('wip_view_comments') == "on") {
            comments_template();
        }
    }
}
开发者ID:pbhanu1994,项目名称:bhanuprakash,代码行数:23,代码来源:after-content.php

示例14: lookilite_after_content_function

/**
 * Wp in Progress
 * 
 * @author WPinProgress
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * It is also available at this URL: http://www.gnu.org/licenses/gpl-3.0.txt
 */
function lookilite_after_content_function()
{
    if (is_home() || is_category() || is_search() || is_tag() || is_page() && get_post_type() != "page") {
        lookilite_excerpt();
        ?>

        <div class="post-info">
            <div class="left"> <?php 
        echo get_the_date('m.d.Y');
        ?>
 </div>
            <div class="right"> <?php 
        the_category(', ');
        ?>
 </div>
        </div>
            
        <div class="clear"></div>

	<?php 
    } else {
        the_content();
        if (get_post_format()) {
            echo '<footer class="line"><strong>' . __('Post type', "lookilite") . ':</strong> ' . ucfirst(get_post_format()) . '</footer>';
        }
        if (get_post_type() == "post") {
            ?>
        <div class="post-info">
            <div class="left"> <?php 
            the_category(', ');
            ?>
 </div>
            <div class="right"> <?php 
            the_tags('Tags: ', ', ', '');
            ?>
  </div>
        </div>
            
        <div class="clear"></div>

    <?php 
        }
    }
    ?>

<?php 
}
开发者ID:akashprabhakar,项目名称:wordpress,代码行数:55,代码来源:after-content.php

示例15: csadv_after_content_function

 function csadv_after_content_function($type = "")
 {
     if (!csadv_is_single()) {
         do_action('csadv_excerpt');
     } else {
         if ((!csadv_postmeta('csadv_view_post_info') || csadv_postmeta('csadv_view_post_info') == "on") && $type == "post") {
             echo '<div class="line"><div class="post-info">';
             echo '<span class="genericon genericon-time"></span>' . get_the_date();
             echo '<span class="genericon genericon-category"></span>';
             the_category(', ');
             the_tags('<span class="genericon genericon-tag"></span>', ', ');
             if (!csadv_postmeta('csadv_post_icons') || csadv_postmeta('csadv_post_icons') == "on") {
                 echo csadv_posticon();
             }
             echo '</div></div>';
         }
         the_content();
         echo '<div class="clear"></div>';
     }
 }
开发者ID:sharkness,项目名称:csadv,代码行数:20,代码来源:after-content.php


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