In this tutorial, you will learn some processes to migrate the WP Show Posts Plugin to GenerateBlocks.
If you are a regular GeneratePres user then you might have already guessed what we are doing to do here.
If not, then here we are going to merge all of the WP Show Posts (WPSP) functionality to GenerateBlocks.
The reason is simple i.e. Tom Usborne and the team decided to merge WP Show Posts with GenerateBlocks as WP Show Posts needed an upgrade to block editing. Here, Generateblocks provides almost all the functionality that WPSP could provide.
Migrating from WP Show Posts Plugin to GenerateBlocks
The new GenerateBlocks 1.5 has added Dynamic Data, Query Loops, & Image Blocks and here we are going to utilize those functionalities while migrating.
1. Migrating Featured Posts in GeneratePress Sidebar
Here, we are going to migrate showing featured posts in the GeneratePress sidebar from WP Show Posts to GenerateBlocks.
Here we are going to use Generateblocks Query Loops. Here I have set featured as a tag for some posts that I want to feature in the sidebar widget.
So, let’s get started. Before that please make sure you are using the latest version of GenerateBlocks.
First, I am going to visit my widget section. Appearance > Widgets.
First, add a Container block, and inside the Container block, add a Query Loop Block.
Now add Title & Date Layout to start with, here we only need the title, so delete the post date meta.
Now, you select the Query Loop block and you can see Query Parameters settings on the right side.
Click on Add Parameters > Under Select query parameter > Choose Taxonomies > Select Tags > Choose featured tags under Select terms.
Now, you will be able to see the list of featured posts, you can control the settings using Generateblocks. So play with those settings.
Like, to adjust the spacing between two post links, you have to first select Post Template Block and change Vertical Gap.
2. Migrating the Latest Posts from WP Show Posts on the Homepage
Showing the latest post or featured post on your homepage is much easier now with Generateblocks. Before we were using the WPSP plugin but now with Dynamic Data, Query Loop, and Image Block it’s easier to add the latest posts or featured posts.
As always, first, add the Container block.
Inside the Container block, add the Query Loop block from GeneratePress, not the default one.
Now choose Two columns & a featured image Layout.
Let’s say you want to show 3 posts in a row then make a container width of 33 or if you want to show 4 posts in a row then make a container width of 25.
For this tutorial, I am going to delete the Post Excerpt block. Now, manage container spacing, adjust Post Title Font Size, etc. to make it beautiful. Also, adjust the Post Template Horizontal and Vertical Gap.
Here is the tip for you, if you have images with distinct widths and heights for each post then you can adjust it by following ways.
First click on an Image block, Under settings, assign the height of the image, let’s say 130 px, under Object-fit choose Cover. That’s it.
3. Migrating Related Posts from WP Show Posts on Generateblocks
Here we are going to create related posts using GenerateBlocks and here we are going to migrate our existing related posts created using WP Show Posts earlier.
First, you need the GenerateBlocks Pro version to enable certain features to enable related posts in your current posts.
Go to Appearance > Elements to Add New Elements. Choose Block as Choose Element Type to create a new Block.
Name your Block Element as Related Posts.
Now, Add a Container Block and add some padding around 10px from all sides. Inside the container block, add Heading as Recommended Reading…
Now, within Container Block, add Query Loop by GenerateBlocks.
Add the Title & date as a Query Loop Layout to start with. You can delete Post Date from Post Templates if you want to remove the date.
Now select Query Loop and add Parameters like in the screenshot.
- Select Post Type – Posts
- Post Per Page – 10 by default (Change as required)
- Taxonomies – Categories or Tags
- Select Terms – Current Post Terms
- Exclude Posts – Exclude Current Post
- Order by – Date
- Now Choose Location as Post – All Posts.
Now the final step is to select the Element type as Hook and Hook Name as after_content.
Finally, Hit the Publish button.
Here is the result of the related post in GeneratePress using the Generateblocks Pro version.
Check Out: Switch your WordPress Theme to GeneratePress
At the End
Likewise, you can use the Generateblocks plugin to design or edit various parts of your website and it is more powerful than ever.
Moreover, you can completely switch from the WP Show Posts plugin to Generateblocks as the GP Team is merging all the functionality of the WPSP free and Pro version to the GB Free and PRO version.
Can you make a tutorial on how to create Related Posts using GenreateBlocks (not using WP Show Posts)?
Hi Pintu,
You need GB Pro for this.
Update: Now, you can check the above tutorial to migrate your related posts from WP Show Posts.
Thanks
Hey Suraj! How to show “Recommend reading” section in Generate Press premium.
Hi Soorya, I will soon create a tutorial for this using GB Pro.
Update: Please check the above tutorial.
Thanks
Hi Suraj,
The adjustment of the images in the last posts is done via CSS resizing, very bad, I hope it will change on this point very soon.
No solution to put the exact dimension of the images as it was the case in the alpha version of WP Show Posts?
Hi Suraj,
I am not yet 100% happy with the abandonment of WP-Show Posts because the new GP based dynamic options-feature (which by itself is great) is lacking the option to implement posts by shortcode. This came very handy for me, as I could add “About the author”-informations (showing the featured image, the excerpt and a read-more-button) on product pages (for books) in WooCommerce. Do you know of any way I can still do that with the new feature – maybe with block element? Any advice would be highly appreciated!
Hi Paul,
Haven’t tried these features in WooCommerce but I think you can easily achieve these things using Block Elements.
Thanks
hi suraj, i want use generate press, how to add my wp. what are generate premium?