The Featured Content Block plugin is now available in the WordPress Plugin Directory!
This plugin will allow a user to select specific post or other custom post type to show on a page, like the homepage.
The query loop block is a great tool with site editing now becoming bigger in the WordPress landscape. But one of the issues I’ve run into with it is the ability to select a single content item, like a blog post or a custom post type.
In fact, this was something I’ve had to work around with building a premium portfolio theme that I hope to release soon. I wanted there to be a way for a user to be able to show a specific portfolio item on a page (like the homepage). But I quickly realized that the query loop doesn’t allow for this yet.
So I’ve built this plugin to help others who might want to do the same.
To use this plugin, go to the block inserter and scroll down to “Widgets” to see the block. Also, if you have any custom post types that are public, there will be variations of the block for those post types.
Once you insert the Featured Content Block into the page, you’ll need to select the specific post or custom post type item in the inspector controls on the right side of the screen.
After you’ve selected the post, you can then build out how the block looks using various post template blocks, like the post title block, post excerpt block, featured image block and more. This gives you full control over how the block looks on your page.
And if you want something that’s more plug-and-play, there are also a few block patterns that you can choose from so that you can just select the post and move on with continuing to create content on that page.
This is the easiest way to highlight your best content on your homepage, a landing page or any other page on your website!