Read MoreThe best VPS hosting starts from $5 per month!

How To Add Related Post After Each Post To Your Ghost

Related post is a one of the must have things, That every blog should have. Here I am talking about related post widget after each blog post to your ghost blog. Unfortunately, Ghost team doesn’t added related post features by default and there is no easy ways to do it for beginners.

However, For those who wants to add a related post widget after each blog post in ghost, Here is my instruction that will help you to setup a related post widget to your ghost blog with a few steps.

Adding Related Post Widget In Ghost

You know, Ghost still on the way of future and they planned to add a lot of awesome features in near future. Tough, Related post still not in their Roadmap But, I hope they will add this feature to their future updates. Or Related post functionality can be also come as a dedicated ghost apps. Actually, I’m waiting to see what ghost brought to us in near future.

However, Until they made it, We can use a 3rd party application to do that. In my case, I used LinkWithin related post application to put a related post widget after each blog post. In this Tutorial, We are going to use LinkWithin Related post widget to our ghost blog. But before We start Implementing LinkWithin to our ghost blog, I’d like to explain some more about LinkWithin.

LinkWithin provides free service similar to nRelate and Outbrain but, this service is limited to only related post within the same blog. Day by Day LinkWithin becomes a popular related links or posts widget for bloggers. It also provides related post widget service with thumbnail feature to make it more awesome.

It will display related blog post from your blog archive, So the old blog post also appear if those are relevant with current blog post. The installation is easy and The simple design will influence your audiences.

By the way, In order to add LinkWithin related post widget after each blog post on your ghost blog, You will need to grab the source code from http://www.linkwithin.com/learn

related post

In order to grab the LinkWithin source code, Insert your email, Blog link and Maximum related blog post to display. You also need to select “Other” from platform Dropdown menu and then hit on the “Get Widget” Button. You can also tick on the “My blog has light text on a dark background” tickbox if you want dark background and light text on related post widget.

After that, LinkWithin will provide you the source code like this:

<script>
var linkwithin_site_id = *******;
</script>
<script src="https://www.linkwithin.com/widget.js"></script>
<a href="http://www.linkwithin.com/"><img src="https://www.linkwithin.com/pixel.png" alt="Related Posts Plugin for WordPress, Blogger..." style="border: 0" /></a>

Now, Copy the source code and store on your computer, Because we need to place the code to our ghost theme.

First, Access your ghost installation using an SSH client. After that, Edit your ghost blog’s active theme’s post.hbs with your preferred editor. If you are using the default theme Casper, then the post.hbs file can be found here ghost-installation-directory/content/themes/casper/post.hbs.

Now copy and paste the LinkWithin source code right before </header> tag to display related post widget right after your blog post. The default related post Widget by LinkWithin will appear as shown below:

Related post with Thumbnail in ghost

And don’t forget to restart your ghost blog to apply the changes and then visit your blog to see the related post widget to your ghost blog.

2 Comments

Leave a Reply