Blog post past few days has been grabbed someone else take,Though Contact Webmaster and communication to solve,But I still have to reflect on their own,The body of the article did not add article link,Cause even if people can not get crawled pingback ......
Plug-law
In short,Search a pass,There seems to be a plug-in before you can step (I happen to be the kind of person like a lot of plug-ins),Called "Add Post URL",But this plugin has the shelf。
This approach does not work,But to try to modify the code level:
Change text Template
This approach requires you to compare the theme "primitive",Or you are familiar with PHP language,The principle is found in the wordpress theme single.php file,In the inside get_post() Function below into the corresponding statement and link,But for me,My theme in this part of the code is directly,I'm not familiar with PHP language,This approach does not work。
Code to add plug-in
Eventually,I http://www.shouce.ren/api/view/a/10433 found a way,Add code to functions.php,The body of the injection copyright notice and link at the end of the article,Such a database text will not be flooded with similar content:
1 2 3 4 5 6 7 8 |
add_filter ( 'the_content', 'wp_copyright' ); // 文章末尾增加版权 //文章末尾加版权声明函数 function wp_copyright($content) { if (is_single ()) { $content .= '<p>本文由 落格博客 原创撰写:<a href="'.get_bloginfo('url').'">'.get_bloginfo('name').'</a> » <a href="'.get_permalink().'">'.get_the_title().'</a></p><p>转载请保留出处和原文链接:<a href="'.get_permalink().'">'.get_permalink().'</a></p>'; } return $content; } |
discuss
of course,The last one is the most important,We pray with folded hands 🙏️ crawl content owners mercy ...... after all, so his statement,On a regular removed ......
Original article written by LogStudio:R0uter's Blog » WordPress automatically add copyright text and text link
Reproduced Please keep the source and description link:https://www.logcg.com/archives/3274.html
The code is very good,Already used!
Talking brother,Don't consider changing the blog theme? Hahahahahaha
Too lazy to change,Every year there is a new default theme, I will change to hehe,Don’t bother to do anything else~ (return to basics, haha)
Oh oh oh
This WordPress 2020 Theme,A rowing ah!
Yay
Search pocketed input method ,I found the developer's blog,Or use of wordpress。