By default Related Posts for WordPress has specific weights for titles, categories, tags and custom taxonomies. After a lot of testing we found these weights result in the best related posts suggestions.
By default these weights are:
|Links in content||20|
These numbers represent the ‘weight’ each word in the title/category/tag has, you can say each words gets multiplied by it’s weight.
We’ve added the following filters that allow you to change these weights:
Example of changing the title weight to 100
The follow code changes the title weight to 100, be sure to change the function name if you use this code on live websites.