• January 30, 2024

Display Recent Posts on WordPress Sidebar, 2024


Two ways to display recent posts from the same category

in your WordPress sidebar, along with visuals for clarity:

1. Using the Latest Posts Block (Gutenberg editor):

Steps:

  1. Access the Sidebar:
    • Go to Appearance > Widgets in your WordPress dashboard.
    • Locate the widget area for your sidebar.
  2. Add the Latest Posts Block:
    • Click the Add block button and search for “Latest Posts.”
    • Select the Latest Posts block and add it to your sidebar.

Opens in a new windowwww.termsfeed.com

WordPress dashboard with Widgets section and Add block button highlighted

  1. Filter by Category:
    • In the block settings panel on the right, find the Sorting & Filtering section.
    • Under Categories, select the specific category you want to display posts from.
  2. Customize and Save:
    • Adjust other settings as needed, such as the number of posts to display or whether to show thumbnails.
    • Click Update to save the changes.

2. Using a Widget:

Steps:

  1. Access Widgets:
    • Go to Appearance > Widgets in your dashboard.
  2. Add a Widget:
    • Find a suitable widget that allows category filtering, such as:
      • Recent Posts with Thumbnails (built-in)
      • Category Posts Widget (plugin)
    • Drag and drop the chosen widget into your sidebar area.

Opens in a new windowqodeinteractive.com

Widgets panel with Recent Posts with Thumbnails widget highlighted

  1. Configure Settings:
    • In the widget’s settings, select the specific category you want to display posts from.
    • Adjust other settings as needed.
    • Save the changes.

Remember:

  • The exact widget names and options might vary depending on your WordPress theme and plugins.
  • If you’re comfortable with code, you can create a custom widget using WP_Query for more advanced control.
  • Test the sidebar on different posts to ensure it’s working correctly.

With help of Google Bard

Leave a Reply

Your email address will not be published. Required fields are marked *