简体   繁体   English

WordPress 带有标签显示的 RSS 提要

[英]WordPress RSS feed with tag display

I have just fresh WordPress installed.我刚刚安装了新的 WordPress。 I am going to post a blog, I have created a category called "Client care" and created tags name "news" also I post the blog我要发布博客,我创建了一个名为“客户服务”的类别并创建了名称为“新闻”的标签,我也发布了博客

When I checked my RSS feed (name.com/feed), It'll display当我检查我的 RSS 提要 (name.com/feed) 时,它会显示

在此处输入图像描述

Can anyone please tell me, how do I fix this issue?谁能告诉我,我该如何解决这个问题?

use this code for showing tags使用此代码显示标签

$tags = get_the_tags( get_the_ID() );
foreach($tags as $tag){
         echo '<p>'.$tag->name.'</p>';
}

At Essence.com, we use this在 Essence.com,我们使用这个

<topics><![CDATA[<?php echo implode(', ', wp_get_post_terms(get_the_ID(), 'article_tags', array('fields' => 'names'))); ?>]]></topics>

in a custom RSS feed template.在自定义 RSS 提要模板中。 It displays the tags with links separated by ",".它显示带有以“,”分隔的链接的标签

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM