Output the WordPress article copyright in the bottom of the text and the feed

Time:2019-11-7

Previously, we only knew to add copyright notices, article labels and related logs to WordPress articles, but seldom considered to output these information to the feed. Especially for article copyright, we usually add it to WordPress template page single. In fact, it’s not perfect. When the blog has a certain subscription, the article is easy to be collected by the robot, so it is very necessary to do a good job of anti collection.

If you check the feed, it will not output the copyright information of the article. In the feed of WordPress tutorial network, you can see the output of WordPress related daily and blog article labels. What are the specific functions.
Introduce a method
Output the copyright of WordPress article at the bottom of the text and in the feed. Add the following code to the functions of the topic:

Copy code

The code is as follows:

/** RSS Feed copyright */
function feed_copyright($content) {
if(is_single() or is_feed()) {
$content.= “<blockquote>”;
$content. = ‘< div > & raquo; reprint Reserved Copyright: < a title = “blog name” href = “blog address” > blog name < / a > & raquo; < a rel = “bookmark” title = “‘. Get the” title(). ‘”href =”‘. Get the “permalink(). ‘” > get the “title().’ < / a > < / div >;
$content. = ‘< div > & raquo; link address of this article: < a rel = “bookmark” title = “‘. Get the title(). ‘” href = “‘. Get the permalink(). ‘” >’. Get the permalink(). ‘< / a > < / div >’;
$content. = ‘< div > & raquo; if you like it, you can: < a title = “blog name” href = “subscription address” > Click here to subscribe to our site < / a > < div >’;
$content.= “</blockquote>”;
}
return $content;
}
add_filter (‘the_content’, ‘feed_copyright’);

Using the above code, you can actually achieve many things, even add Google Adsense.
Introducing a WordPress anti collection plug-in
© feed plug-in (copyfeed)
It can display the article version, related articles, user comments, etc. in the feed subscription, even output article classification, tags, etc., and these styles can be customized, support HTML, provide digital fingerprint encryption and IP shielding and other functions, which are quite excellent in WordPress anti Collection Series plug-ins.