What are WordPress Ads

Show similar posts with WordPress

Similar articles (often also as "Related Posts" titled) is known from numerous websites these days. They can be very useful, after all, they show other posts that deal with a similar topic and could therefore also be of interest to the reader.

In this article, I would like to take a look at the advantages of such a function for you. I will also show you how to do it easily similar posts on your WordPress website can incorporate.

Similar posts increase the length of stay

A visitor comes to your site and reads what you are offering them in terms of content. But he came with a certain search intention, which your post ideally fulfills. Either he then leaves your side or he reads further through similar postsbecause it has experienced a lot of added value and it still makes sense in the other contributions.

It is of course good if the visitor continues stay on your side, reads your posts and possibly clicks on advertisements or even becomes your customer. It is precisely for this reason that it is important to provide the reader with further reading recommendations as simply and directly as possible. The display of similar, thematically matching articles is a great way to do this.

Consequences in search engine optimization

Leaving the page is not yet negative per se. It only becomes problematic when this happens in such a short time since entering the website that Google assumes that they won't find what they're looking for in you. Your page therefore does not satisfy that Search intention and that is unsatisfactory - neither for the reader nor for Google. But because Google wants to continue to offer searchers the best content, pages are placed in front that inspire their readers.

One factor that increases this, according to popular belief, is that Length of stay. If the visitor doesn't just come to your site and then leave it after a few minutes, that's always a positive signal. Your page is obviously perceived as relevant, it brings added value and provides the reader with valuable information. By the way, it works on exactly the same principle when people come to your page from social media and then click through the similar posts.

This means that larger pages remain clearer

Imagine your page has around 2,000 posts. No matter how many categories there are, the reader has it not very clear. Of course the reader can use the search function if he is interested in a specific topic. But when it comes to trick dogging, for example, he may also be interested in dog dancing - without being aware of it beforehand. At the same time, using a website's search function is always a bit of work.

similar posts start right here and show other articles according to your predefined specifications. The common ground can arise through the content, through certain keywords, but also through the category that they both have in common. Depending on WordPress plugin for "Related Posts" you can also manually determine which posts should still be displayed here and then take care of your readers.

Output similar posts via plugin

First, let's look at the easiest way to do this similar posts to output under an article - namely by WordPress plugin. As is often the case, you have a wide variety of add-ons available to do this.

In the following I will introduce you to the three probably the most frequently used services for this.

Jetpack

Jetpack is already part of the normal scope for many operators of a WordPress site. It comes with a lot of extensive additions. Next to one Website accelerator, the Share function for social media and the delayed loading Of course, that also belongs to images and other media View related posts to.

One and only disadvantage is that Jetpack often takes a long time to load the posts. This is not a problem if you find that your readers are mostly going through the whole post anyway instead of scrolling down to the bottom. In addition, Jetpack uses tags and categories to identify similar content. Content equality only comes together to a limited extent. Usually this is done through similar featured images or the titles. A fact that is often sufficient for online magazines.

When in doubt, personal blogs prefer to see less relevant posts than no posts at all. Because that happens to Jetpackif not enough similar articles are found. In the end there are none at all.

Contextly

Contextly is a pure one Premium service, of which, unlike Jetpack, there is no free version. You can test it for free for at least 21 days.

From $ 9 you can have your site crawled regularly per month. In return, contributions that really match the content are presented, which of course brings your readers a corresponding added value. Payment is based on the scope. With a larger site, the price also rises rapidly. 500,000 articles, for example, already cost $ 99.

Contextual Related Posts

This free WordPress plugin is able to find posts on your page that are completely appropriate to the context and then also display them below. However, it does require a lot of customization, and it is not quite as simple as the plugin often promises. However, you don't have to be able to program in order to change it optically.

The only Contra here is the often long time that elapses before there are further updates. As a rule, the wait is between four and five months.

Similar posts with WordPress premium theme

Premium themes - such as the Divi Theme, Avada or Enfold - often already offer the option of displaying similar posts. That alone shows how relevant this function has become these days. Just find out if this feature is included before buying.

Show similar posts manually by code

Last, but not least, there is of course the option of working with a Snippets of code to display the similar posts in the theme. As always, it is important to create a suitable WordPress backup beforehand.

In most cases, you open the single.php File and add over the Comments and according to the article content the following one:

// Show similar posts
$ orig_post = $ post;
global $ post;
$ tags = wp_get_post_tags ($ post-> ID);
if ($ tags) {
$ tag_ids = array ();
foreach ($ tags as $ individual_tag) $ tag_ids [] = $ individual_tag-> term_id;
$ args = array (
'Tag__in ‘=> $ tag_ids,
‚Post__not_in‘ => array ($ post-> ID),
'Posts_per_page' => 3, // Number of posts displayed
'Caller_get_posts' => 1,
'Orderby' => 'rand'
);
$ my_query = new wp_query ($ args);
if ($ my_query-> have_posts ()) {

echo '

Similar posts

    ‘;

    while ($ my_query-> have_posts ()) {
    $ my_query-> the_post (); ?>

    <li><div class=“related-images“><a href=“<? the_permalink()?>“ rel=“bookmark“ title=“<?php the_title(); ?>“><?php the_post_thumbnail(); ?></a></div>
    <div class=“related-content“>
    <h3><a href=“<? the_permalink()?>“ rel=“bookmark“ title=“<?php the_title(); ?>“><?php the_title(); ?></a></h3>
    </div>
    </li>
    <? }
    echo '

‘;
}
}
$ post = $ orig_post;
wp_reset_query ();

You can of course use this code according to your wishes to adjust. For example, “orderby” specifies how the contributions should be arranged. "Rand" stands for "random", ie sorting according to the random principle. But there is still an alphabetical or chronological order. Here you just have to decide for yourself what you would prefer.

Use child theme

I've already explained why it's so important to use a child theme. Therefore you should of course also include this code in the single.php des Childs themes deposit. So everything will stay as it should be with the next update of your WordPress theme.

Pascal Prohl