Optimize user engagement on your WordPress website with this tutorial on adding related posts in the GeneratePress theme. Whether you're a WordPress user or a website owner, this video provides step-by-step instructions on incorporating a related posts section to keep your audience exploring your content. Dive into the customization process and discover how to seamlessly integrate a related posts feature, enhancing the user experience and encouraging deeper interactions. Tune in to learn how to enrich your GeneratePress-themed website with this valuable feature that keeps visitors engaged and navigating your content effortlessly. 🔄🌐✨
Show More Show Less View Video Transcript
0:00
Hi everyone, welcome to KeyTube blogging and in this video I will show you how you can
0:03
show a related post section to your generated press theme. So as you can see that I am using the generated press theme here and there is no related post
0:12
section showing up here. So how I can add related post section in this blog post
0:18
So here important to note that if you want to fine tune your position of related post
0:24
then you have to consider the premium version of the generated press theme
0:29
So let's check how we can do that. So first of all I will go to the WordPress dashboard here
0:35
Now here I will go to the appearance and I will go to the generated press
0:40
And after installing the generated press premium plugin, you need to activate this option elements
0:47
Once you activate this module, now let's go to the plugins and let's click on add new
0:52
Now here you need to search for a plugin called contextual related post
0:56
So simply search for this and here it is contextual related post
1:01
So let's install this plugin and let me just activate this plugin
1:05
Okay, once you activate this plugin, let's go to the settings here
1:12
And here you can see different options in this plugin to set up your related post section
1:17
So here what I can do is I will remove this post and pages
1:22
So let me just show you by clicking on the post first and here you can simply click on
1:29
save changes here. Now let's open a blog post in this website and let's check if it is showing or not
1:37
So let's scroll down and as you can see that it is showing the related post section here
1:43
just before the tags and these settings. So if you want to show it just below it, then you need to consider the element feature in
1:51
generate post. So let's do that. And before that we need to change something here
1:58
So let's click on list turning here and as you can see that here it is set to maximum
2:03
six blog post. So as you can see that there is six related post showing up here and here you can set
2:11
this option like by relevance and here you can randomize post if you want and you can
2:19
uncheck this page from here and make sure to select this option limit to same post type
2:26
so that it will only show the post from the same post type
2:30
Otherwise it will show pages if you have podcast post type then it will also show the podcast
2:35
in the related post section. So make sure to enable this option and you can also limit to the same author
2:41
So if you are opening a blog post, then it will only show the related post written by
2:45
the same author. Then you can also limit to same post author as well
2:51
And you can also display the related post in the same category as well
2:55
So you can also do that. So here I'm clicking on the save button here
3:00
Now here you need to select these settings. So first of all, I will select this style
3:06
So by default, this round thumbnail is not looking quite good. So here you need to change something like to grid
3:13
So this one looks quite good. Now let's click on save changes here and let me just refresh this page
3:21
As you can see that now it is showing in a grid format. So if you are choosing this, make sure to select like force related post so that it
3:29
will remove this last two related post or you can select this style like this
3:35
So let's click on rounded thumbnail with CSS grid. Now let's click on save changes here
3:40
Let's refresh this page. As you can see that it is showing like this and let's click on style here and let's select
3:52
this masonry option and let's take how it is looking in the front end
3:58
Now let me just refresh this page. As you can see that it is looking quite good
4:02
So here you need to adjust the thumbnail size here. So to adjust the thumbnail size, click on thumbnail here and here you can see different
4:11
options like you can choose the thumbnail 150 into 150 pixel or you can select the large
4:17
like 1024 into 1024 like this, or you can set a custom width as well
4:26
So let's click on save changes here. Let's refresh this page. As you can see that it is now looking quite good
4:34
Now how we can show this related post section after all the content
4:40
So for this, what I can do is I will go to the general tab here and here you will see
4:46
this PHP code snippets. So just copy this PHP code snippet from here, deselect the post and let's click on save changes
4:55
Now we will use this PHP code snippet and load it after the content
5:00
Let's go to the appearance and click on elements tab here. Now here let's click on add new element here and here let's select the hook element type
5:09
to hook. Now let's click on create here and I can name it like related post and I will paste that
5:18
PHP code. So as this is a PHP code, you need to select this option execute PHP and you can select
5:25
the priority to 21 and here you can select the hook location
5:30
So let's select the hook location to generate after content. Here it is generate after content
5:37
Now let's click on display root and here I will click on here and I will search for
5:42
this option post. Here it is post and it will apply to all blog posts
5:48
Now let's click on publish here. Now let's go to the blog post and let's refresh this page and let me just scroll down the
5:55
page and as you can see that now the related post showing at the end of the content
6:01
So in this way you can show a related post section to your generate press theme using
6:06
the contextual related post plugin. So if you have any doubt regarding this, then you can ask me in the comment section and
6:12
if you found this video helpful, then make sure to hit the like button and I will see
6:16
you in the next one. Bye.
#Blogging Resources & Services
