Category Posts in Custom Menu


Download

You can get the plugin here.


Contributors: anaid

Tags: menu, category, post tag, posts, dynamic, automatic

Requires at least: 3.2.1

Tested up to: 5.7.2

Stable tag: 1.3.0

Dynamic menus: This plugin automatically replaces selected Category links / Post Tag links in a Custom Menu by a list of their posts.

Description

The default menu in WordPress only allows adding a link that leads to a list of posts and pages belonging to a taxonomy (category, tag, etc). If you want to list the posts and pages themselves automatically, I hope you will find this plugin useful.

Using it

Enable the plugin and go to Appearance > Menus. Create your Custom Menu. Add a taxonomy (category/tag/custom) to the menu. Next, you can choose if you would like to replace the original link (to a page that lists the items) by the posts and pages themselves.

For each Category or Post Tag item in the menu, you now have the following extra configuration options:

  • replace the link by a list of posts in the menu y/n;
  • specify the (maximum) number of posts you want to show for this item (-1 = all), and
  • their ordering (ascending/descending by ID, author, title, date, modified, parent, rand or comment_count);
  • specify the title for the menu items: for this you can use the wildcards %post_title and %post_author, or wildcards for custom fields, like %post_my_field, where ‘my field’ or ‘my_field’ is a custom field;

Wildcards

You can control the title of the menu items generated by the plug-in with the following wildcards:

  • %post_title
  • %post_author
  • %post_featured_image_url
  • %post_featured_image (insers an HTML ‘img’ tag with the featured image or nothing if there is none)
  • %post_featured_image_thumb_url
  • %post_featured_image_thumb (insers an HTML ‘img’ tag with the featured image thumbnail or nothing if there is none)
  • %post_excerpt
  • %post_url
  • %post_date for the unformatted post date: 2012-11-10 18:14:23
  • %post_date() for a formatted post date with the following default formatting: November 10th, 2012
  • %post_date(<your formatting here>) for custom date formatting. Example: %post_date(l jS \of F Y, h:i:s A). See https://codex.wordpress.org/Formatting_Date_and_Time for formatting options.
  • %post_date_gmt
  • %post_date_gmt()
  • %post_date_gmt(<your formatting here>)
  • %post_status
  • %post_modified
  • %post_modified()
  • %post_modified(<your formatting here>)
  • %post_modified_gmt
  • %post_modified_gmt()
  • %post_modified_gmt(<your formatting here>)
  • %post_comment_count
  • wildcards for custom fields, like %post_my_field, where ‘my field’ or ‘my_field’ is a custom field

More info

Visit the plugin page at wordpress.org

Screenshots