
wordpress页脚修改
您想在 WordPress 中自定义 RSS 提要页脚吗?这允许您在 RSS 提要中的帖子内容下方添加自定义文本、链接甚至广告。在本文中,我们将向您展示如何在 WordPress 中轻松控制 RSS feed 页脚,以及如何将自定义 feed only 内容添加到您的帖子中。
您想在 WordPress 中自定义 RSS 提要页脚吗?这允许您在 RSS 源的帖子内容下方添加自定义文本、链接甚至广告。在本文中,我们将向您展示如何轻松控制 WordPress 中的 RSS 提要页脚以及如何向您的帖子添加自定义仅提要内容。

为什么要在WordPress的RSS Feed页脚中添加内容? (Why Add Content to RSS Feed Footer in WordPress?)
RSS订阅 offer an easier way for users to read your blog posts in their favorite feed reader apps such as Feedly.
RSS订阅为用户提供了一种更轻松的方式,使用户可以在其喜欢的feed阅读器应用程序(例如Feedly)中阅读您的博客文章。
However, RSS feeds can also be used by content scrapers to automatically steal your blog posts as soon as they are published. Sometimes these content scrapers end up ranking higher than your original post in search engines. To learn more, see our guide on how to 防止在 WordPress 中抓取博客内容.
但是,内容刮板还可以使用RSS feed在发布博客后自动窃取您的博客文章。 有时,这些内容抓取工具的排名最终会高于您在搜索引擎中的原始帖子。 要了解更多信息,请参阅有关如何防止博客内容在 WordPress 中被抓取指南。
向 RSS 提要页脚添加其他内容可让您在主站点和每篇文章末尾添加原始帖子的反向链接。这可以让您的帖子排名更高,即使它们被内容抓取者复制。
向 RSS 提要页脚添加其他内容可让您在主站点和每篇文章末尾添加原始帖子的反向链接。即使您的帖子被内容爬虫复制,这也可以使您的帖子排名更高。
通过操纵 RSS 提要页脚,您还可以鼓励读者不时访问您的网站。
通过操作 RSS 提要页脚,您还可以鼓励读者不时访问您的网站。
话虽如此,让我们来看看如何在 WordPress 中轻松控制 RSS feed 页脚。
话虽如此,让我们来看看如何在 WordPress 中轻松控制 RSS feed 页脚。
方法1.使用Yoast SEO将内容添加到RSS Feed页脚 (Method 1. Add Content to RSS Feed Footer Using Yoast SEO)
This method is easier and recommended for all users. It uses the 优斯特搜索引擎优化 plugin, which is the most popular WordPress 搜索引擎优化 plugin.
此方法更简单,建议所有用户使用。 它使用优斯特搜索引擎优化插件,这是最流行的WordPress 搜索引擎优化插件。
First you need to install and activate the 优斯特搜索引擎优化 plugin. For more details, see our step by step guide on 如何安装 WordPress 插件.
首先,您需要安装并激活优斯特搜索引擎优化插件。 有关更多详细信息,请参阅有关如何安装 WordPress 插件步指南。
Upon activation, you need to visit 搜索引擎优化 » 仪表板 page and click on the ‘Features’ tab. Next, scroll down to the ‘Advanced settings pages’ section and make sure this option is ‘Enabled’.
激活后,您需要访问搜索引擎优化 » 仪表板页面,然后单击“功能”选项卡。 接下来,向下滚动到“高级设置页面”部分,并确保此选项为“启用”。

不要忘记保存更改以重新加载插件。之后,您将能够在 SEO 菜单下看到更多选项。
不要忘记保存更改以重新加载插件。之后,您将能够在 SEO 菜单下看到更多选项。
Next, you need to visit 搜索引擎优化 » 高级 page and click on the RSS tab.
接下来,您需要访问搜索引擎优化 » 高级页面,然后单击RSS选项卡。

在 RSS 提要设置下,第一个框允许您在每个帖子之前添加内容。第二个框允许您将内容添加到帖子页脚。
在 RSS 提要设置下,第一个框允许您在每个帖子之前添加内容。第二个框允许您将内容添加到后页脚。
Yoast SEO 会自动在 RSS 提要页脚中添加带有反向链接的信用文本到您的网站。您可以按原样使用文本,也可以添加自己的内容。
Yoast SEO 会自动在 RSS feed 页脚中添加带有反向链接的信用文本到您的网站。您可以按原样使用文本或添加您自己的内容。
不要忘记单击“保存更改”按钮来存储您的设置。
不要忘记单击“保存更改”按钮来保存您的设置。
您现在可以查看 RSS 源以查看更改。在每篇文章的末尾,您将能够看到添加到 RSS 提要页脚的内容。
您现在可以查看 RSS 源以查看更改。在每篇文章的末尾,您将能够看到添加到 RSS 提要页脚的内容。

方法2:在WordPress中手动将内容添加到RSS feed页脚 (Method 2: Manually Add Content to RSS Feed Footer in WordPress)
This method requires you to add code to your WordPress files. If you haven’t done this before, then check out our guide on 如何在 WordPress 中复制和粘贴代码.
此方法要求您将代码添加到WordPress文件中。 如果您以前没有做过,请查看有关如何在 WordPress 中复制和粘贴代码指南。
You’ll need to copy and paste the following code in your theme’s 函数.php file or a 特定于站点的插件.
您需要将以下代码复制并粘贴到主题的函数.php文件或具体的于在网站的插件中 。
function wpb_feed_filter($query) {
if ($query->is_feed) {
add_filter('the_content','wpb_feed_content_filter');
add_filter('the_excerpt_rss','wpb_feed_content_filter');
}
return $query;
}
add_filter('pre_get_posts','wpb_feed_filter');
function wpb_feed_content_filter($content) {
// Content you want to show goes here
$content .= '<p>Thanks for reading, check out <a href="'. get_bloginfo('url') .'">'. get_bloginfo('name') .'</a> for more awesome stuff.</p>';
return $content;
}
此代码只是检查请求的页面是否是 RSS 提要,然后过滤内容以在 RSS 提要页脚中显示您的消息。
此代码只是检查请求的页面是否是 RSS 提要,然后过滤内容以在 RSS 提要页脚中显示您的消息。
We hope this article helped you learn how to control RSS feed footer in WordPress. You may also want to see these helpful 优化 WordPress RSS 源的技巧 and get more traffic.
我们希望本文能帮助您学习如何在WordPress中控制RSS feed页脚。 您可能还希望查看这些有用的优化 WordPress RSS 源的技巧并获得更多流量。
If you liked this article, then please subscribe to our YouTube 频道 for WordPress video tutorials. You can also find us on 推特 and Facebook.
如果您喜欢这篇文章,请订阅我们的YouTube 频道 WordPress视频教程。 您也可以在推特和Facebook上找到我们。
翻译自: https://www.wpbeginner.com/plugins/control-your-rss-feeds-footer-in-wordpress/
wordpress页脚修改