本文整理汇总了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
}
示例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('•') . '</span>';
echo '<span class="entry-tags">' . the_tags(' • ', ' • ', '') . '</span>';
}
示例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>';
}
示例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
}
示例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;}
示例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;
}
示例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;
}
示例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;
}
示例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
}
示例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
}
示例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();
}
}
示例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
}
示例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();
}
}
}
示例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
}
示例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>';
}
}