Have you run into this scenario? You have content that needs to live on multiple sites but you are concerned about SEO issues duplicating said content?
As search engines crawl the web looking for pages to include in their search indexes they may run across content duplicated from another site. When that happens the search engine will first attempt to determine which site is the “source of truth”. The site with duplicated content will be penalized in rankings. If no source can be found both sites rankings will be penalized. An SEO nightmare.
Is it possible to distribute the same content to multiple sites without incurring this penalty? The answer is a resounding YES! All you need to do is let the search engine know where the real of the article is, the canonical article. This is done by including a tag in the html head area. It is for search engines, humans do not typically see it.
WordPress has some built in canonical abilities however in WordPress itself there is no way to set the canonical url. I tend to have articles published all over the web that I would like to copy to this site for posterity. Today I whipped up a little plugin that provides a simple url field to add the article’s canonical url in a search engine friendly way.
It is as simple as adding the url as you create the article!
Publish your post and WordPress will handle the rest.
Here is an example post that I wrote on team building for WebDevStudios.
You may notice there is also a brief disclaimer at the top of the article. That is optional and may be helpful to some readers and/or required by the site you are reposting from to comply with guidelines.
If you want to use this plugin on your own site simply head over to Github and download the plugin!
Find and update WordPress posts with comments older than NNN days
By Ben Lobaugh (blobaugh)
On March 12, 2018
In Computing, MySQL, Programming, Web Development, WordPress
I have a use case where I need to disable comments on posts in WordPress where the last comment was more than one year, or 365 days, ago.
Posts can be found with this query:
The outer query takes the inner query as the search parameter. The inner query is finding the latest comment for each post based on the number in the WHERE condition. 365 represents 365 days, or 1 year.
Therefore, this query is getting the latest comment for post where the comment is less than 1 year old.
Now let’s say you need to update the posts to disable comments. The goal is to disable commenting for all posts that have not had a comment within the last year. It can be accomplished with the following:
Here again the number 365 represents the number of days.
Check the posts and you should see the comments have been closed.