Recent Posts widget to only display posts from a specific category

I’m creating a page that I want to display posts from a certain category and then have a sidebar which displays a recent posts widget, but only showing the posts from the category that’s on the page. Page is https://patriciacrossleyhayes.co.uk/freelance-journalism/.

Hello @simonwr1976,

Thanks for writing to us

By default, WordPress does not include a widget to display posts from a specific category. Instead, you can use a classic shortcode to show posts from the category you need. For example:

[recent_posts count="4" category="block"]

You can adjust the category slug and count value in the shortcode to match your desired category and number of posts.

Please have a look at this article

Thanks

Thanks, I think I’ve now created this correctly. I’ve then added the widget to the sidebar, which I’ve assigned to the page, but it’s still not showing

Hello @simonwr1976,

Upon review, the post is now displaying on our end.​ To ensure you see the latest version, please clear your browser cache and refresh the page.​ For styling, use the Shortcode options to customize the appearance to match your design needs, or style it using custom CSS code.

Thanks

Thanks again, I’m now making some progress, but there appears to be a character limit on the post title. How / where can I change this.

Hello @simonwr1976,

Regretfully, there is no option for that at the moment; it would require custom development. I would suggest you please get in touch with a developer who can help you with your concerns or subscribe to One, where customization questions are answered. Please note that we don’t provide custom development support; it is out of the support scope.

Alternatively, you can create a component, then use the Looper and set the Looper provider as a query builder. Select the category from the taxonomy select box to display the post form for the specific category. Now, copy the component shortcode and paste it into the widget. Please have a look at this screen recording video.

Thanks for understanding