Related Posts functions in WordPress without using the plugin

Tuesday, December 29th, 2015 (0 Comment)

Feature display related articles not only help readers easily find the content relevant to the article they are reading, but it also helps us to strengthen and improve internal backlink rate, page views very good. You can see your page views will increase significantly when displays related posts on the blog, but if you let it show in the normal way as his blog, these seem not increased pageviews tells much.

There are many ways to display Related Post. You can use Plugins as below:

  • Yet Another Related Posts Plugin
  • Similar Posts
  • WordPress Related Posts
  • plugin JetPack for WordPress 4.0 upwards

Use the correct plugin is very convenient and fast, but I advise you not to abuse because installing too many plugins, it will make your website run very slow. So now I will guide displays related posts in WordPress comes with thumbnail images without using plugins very simple for you.

The idea: We’ll get all the articles with current Post ID, the next will use while loop to show off the article with ID tag or category just get above minus current article.

Add 2 functions below in functions.php file.

1.Show related posts by Tag

2. Show related posts by Category

To display the related article in the same tag or a category. May put the following code anywhere in the file single.php.

3. Add css to format layout for related posts

You can edit the css as your wish.

 

Tags: , ,

Related Posts

wordpress
Why should use WordPress Framework
wordpress
Create responsive menu in wordpress using bootstrap
wordpress
Create breadcrumbs function without plugin
wordpress
Set and show most viewed post on WordPress

Related Posts

wordpress
Why should use WordPress Framework
wordpress
Create responsive menu in wordpress using bootstrap
wordpress
Create breadcrumbs function without plugin
wordpress
Set and show most viewed post on WordPress

Leave a Reply

Your email address will not be published. Required fields are marked *