Custom Post Type Menu Highlighting WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA
A WordPress plugin that allows you to highlight menu items as parents of specified custom post types
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/dxw/custom-post-type-menu-highlighting/archive/refs/heads/main.zipCustom Post Type Menu Highlighter
This plugin allows you to mark selected WordPress menu items as the parents of custom post types or taxonomy archives. It does this by adding the current-menu-ancestor class to those menu items when viewing that custom post type/taxonomy archive. Your CSS will need to be configured to style menu items with the current-menu-ancestor class appropriately.
How to use
Install the plugin using Whippet (recommended), or copy it directly into your wp-content/plugins/ directory for non-Whippet projects.
To mark a menu item as the parent for a custom post type, add post-type-[post-type-name] to the "CSS Classes" box for the item in the menu editor.
To mark a menu item as the parent for a taxonomy, add tax-type-[taxonomy-name] to the "CSS Classes".
Development
Install the dependencies:
composer install
Run the tests:
vendor/bin/kahlan spec
Run the linters:
vendor/bin/psalm
vendor/bin/php-cs-fixerReleases
2 releases.
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.