hi everyone welcome to ketube blogging and in this video I will show you how you can show a related post section to your generate press theme so as you can see that I am using the generate press theme here and there is no related post section showing off here so how I can add related post section in this blog post so here important to note that if you want to fine tune your position of related post then you
Activate this module now
have to consider the premium version of the generate press theme so let's check how we can do that so first of all I will go to the WordPress dashboard here now here I will go to the appearance and I will go to the generate press and after installing the generate Plus premium plugin you need to activate this option elements once you activate this module now let's go to the plugins and let's click on add new
now here you need to search for a plugin called contextual related post so simply search for this and here it is contextual related post so let's install this plugin and let me just activate this plugin okay once you activate this plugin let's go to the settings here and here you can see different options in this plugin to set up your related post section so here what I can do is I will remove this posts and pages so let me
just show you by clicking on the post first and here you can simply click on Save changes here now let's open a blog post in this website and let's check if it is showing or not so let's scroll down and as you can see that it is showing the related post section here 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 generate press so let's do that and before that we need to change something here so let's click on list turning here and as you can see
that here it is set to maximum six block post so as you can see that there is six related post showing of here and here you can see it this option like buy relevance and here you can randomize post if you want and you can uncheck this page from here and make sure to select this option limit to same post type so that it will only show the post from the same post type or otherwise it will show Pages if you have podcast post type then it also show the podcast in the related post section so make sure to enable this option and you can also limit to the same author so if you are opening a blog post then it will only show
Display the related Post
the related post written by the same author and then you can also limit to same post author as well and you can also display the related Post in the same category as well so you can also do that so here I am clicking on the save button here now here you need to select these settings so first of all I will select this tiles so by default this round thumbnail is not looking quite good so here you need to change something like to grid so this one looks quite good now let's click on Save changes here and let me just refresh this
page 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 will remove this last two related post or you can select the style like this so let's click on rounded thumbnail with CSS grid now let's click on Save changes here 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 this masonry option and let's check how it is looking in the front end now let me just refresh this page as you can see that it is looking quite good 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 options like you can choose the thumbnail 150 into 150 pixel or you can select the large like one one zero two four into one
zero two four like this or you can set a custom width as well so let's click on Save changes here let's refresh this page as you can see that there is a null now looking quite good now how you can show this related post section after all the content so for this what I can do is I will go to the general tab here and here you will see this PHP code Snippets so just copy this PHP code snippet from here deselect the post and let's click on Save changes now we will use this PHP code snippet and load it after the content let's
PHP code Snippets
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 to hook now let's click on create here and I can name it like related post and I will paste that PHP code so as this is a PSP code you need to select this option execute PHP and you can select the priority to 21 and here you can select the hook location so let's select the hook location to generate after content here it is generate after content now let's click on display root and here I will click on here and I will search for this option post here it is post and it will
apply to all blog post 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 page and as you can see that now the related post showing at the end of the content so in this way you can show a related post section to your generated press theme using the contextual related post plugin so if you have any doubt regarding this then you can ask me in
the comment section and if you found this video helpful then make sure to
hit the like button and I will see you in the next one bye bye.