WordPress Code: Automatic Internal Link Suggestions


๐ŸŸก KnownHost: reliable Dedicated, VPS, Cloud & Shared hosting for WordPress

We all know the importance of high quality external links. You also need to get your internal link structure right to improve your SEO and keep your visitors on your website longer. There are plenty of plugins that can do automatic internal linking but I personally prefer doing it manually. Thanks to this code snippet, you will have a new meta box that suggests posts to link to as you write a new post.

The idea here is simple: it creates a meta box to suggest internal links. It searches your site to find titles similar to the current post and suggests links. You can make changes to the number of suggestions and how it finds internal links. For example, you can use wp_get_post_categories and wp_get_post_tags to find even more relevant posts.

[more snippets]

More WordPress reading: