Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

WordPress does not include a built-in “Recent Posts” dropdown selector. Its core Recent Posts widget displays a list. To create a compact dropdown that updates as you publish, use a shortcode or plugin that queries published posts and outputs a <select> element. If you only need manually curated links, create a normal WordPress menu with child items and render that menu as a dropdown.

Choose the right approach first

A recent-post query and a navigation menu are different systems. A query finds posts by publication date each time the page is rendered. A menu contains saved menu items that a theme or block renders. Your maintenance requirements determine which approach fits.

Approach Updates automatically? Output described Best fit and limitation
Core Recent Posts widget Yes, for the displayed posts List, with optional dates Simple post discovery; it is not a dropdown selector.
Custom shortcode or equivalent plugin Yes, when it runs a current-post query Select dropdown with post links Best for a self-updating dropdown; code must be reviewed for current WordPress compatibility, escaping, accessibility and security.
Menu In Post Only when the underlying menu changes An existing WordPress menu as a list or dropdown Useful when editors already maintain menu items; its listing does not promise automatic population with recent posts.
Postrix Its recent-post output is query-based Widget, block or shortcode Useful for post-type, category, tag, author and ordering filters; a navigation-style dropdown is not established by the listing.

Option 1: Use the core Recent Posts widget for a list

Use this option when visitors can browse a short list and a dropdown is not essential. In the Widgets or Site Editor interface, add the Recent Posts block or widget to the desired template area, set the number of posts and optionally enable dates. WordPress outputs the results as list items.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

This is the least fragile solution, but it will not give you a compact select control or navigate immediately when a visitor chooses an item.

Option 2: Build an automatically updated dropdown

A live dropdown needs two parts: a query for published posts and a select control whose option values are the posts’ URLs. A shortcode is a practical way to place that output in a post, widget, template or menu location.

Use a maintained shortcode or plugin

A secondary tutorial documents the shortcode pattern, but it is more than a decade old. Treat it as a design pattern rather than guaranteed drop-in code. Prefer a maintained implementation that:

  • Queries only the post types and statuses you intend to expose.
  • Escapes option labels and URLs before output.
  • Includes a meaningful label or accessible prompt, not only “Select a post.”
  • Works with keyboard navigation and does not rely solely on a change event that some assistive technologies cannot use.
  • Handles an empty result set and a failed or incomplete query gracefully.
  • Uses the site’s current WordPress and PHP versions.

Place and test the control

  1. Install the shortcode or plugin only from a source you trust, and check its current compatibility and update history.
  2. Insert the shortcode in the block, widget, template or menu position where the selector should appear.
  3. Set the desired post count, ordering and any category, tag or post-type filters offered by that implementation.
  4. Open the page as a logged-out visitor. Confirm that every option points to the intended permalink and that choosing an option produces the expected navigation.
  5. Test with a keyboard, a screen reader if available, narrow screens and JavaScript disabled or blocked. Provide a normal link or submit control if the implementation requires JavaScript.

Because the dropdown is generated at render time, newly published posts can appear without editing a menu. Caching may delay the change until the page cache is refreshed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Option 3: Render a normal WordPress menu as a dropdown

Choose this route when editors want direct control over which posts appear, their labels and their order. Create a menu and add the required post links as items. Drag an item beneath another item to make it a child entry; the active theme determines whether those children appear as a hover, focus or click dropdown.

Classic themes

Use the dashboard’s menu screen to create or edit the menu, then assign it to the theme location where it should appear. The exact labels and locations vary by theme. This menu will not automatically replace an old item when a newer post is published.

Block themes

Open Appearance → Editor and edit the template or part containing the Navigation block. Add, remove and reorder links there. Block themes may not show the classic Menus or Widgets screens, so follow the controls provided by the active theme.

Render the menu in a dropdown location

The wp_nav_menu() function displays a selected menu by its ID, slug, name or menu object. It does not, by itself, retrieve the latest posts and insert them into that menu. A plugin such as Menu In Post can render an existing menu as a list or dropdown, but the menu’s post links still require maintenance unless another system updates them.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Where the plugin choices fit

Menu In Post

Use Menu In Post when you already maintain a WordPress menu and need to display that menu in a list or dropdown through a shortcode. Its advertised function is menu rendering, not automatic recent-post discovery.

Postrix

Postrix advertises a widget, Gutenberg block and shortcode for recent-post displays with filters such as post type, category, tag, author and ordering. Those features can help define which posts appear, but its listing does not establish that it creates a navigation dropdown. Verify the current product documentation before combining it with another dropdown mechanism.

Shortcode in Menus

Shortcode in Menus can render shortcode or HTML content inside a menu item. It can bridge a suitable recent-post shortcode into a menu, but the plugin itself is not evidence of a recent-post query.

Custom PHP: when it is justified

A custom function can query posts and generate the selector, but a community support-thread example is not an official, validated drop-in solution. Have a developer review any code against the current WordPress APIs, the site’s theme, escaping rules, caching setup and intended menu location. Put custom code in a site-specific plugin or an appropriate child-theme component rather than editing a parent theme, so a theme update does not erase it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Common failure points

  • The control shows a list instead: the core Recent Posts widget is being used; switch to a select-producing shortcode or plugin.
  • New posts do not appear: clear page or object caches and check that the query includes published posts and the expected post type.
  • The dropdown works only on hover: test keyboard focus and touch devices; choose a theme or implementation with accessible focus and click behavior.
  • Posts are missing: inspect category, tag, author, post-type and ordering filters, and confirm the posts are published rather than private, scheduled or trashed.
  • A menu item is not updated automatically: a normal navigation menu stores links; it is not a live recent-post query.

Recommended decision

Use the core Recent Posts widget for a straightforward list. Use a maintained, accessible shortcode or plugin when the requirement is a self-updating dropdown. Use a normal Navigation menu when editorial control matters more than automatic updates, and treat menu-rendering plugins as presentation tools rather than recent-post generators.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.