This plugin cleans the HTML of your navigation menu by removing extraneous classes from the “class” attribute of each item of the menu. That makes your HTML code more readable and lighter.
The “slug” of the target page is used instead. Additionally, the “current-menu-item” class is added to let you highlight the menu item corresponding to the currently displayed page. And if that item is part of a submenu, its parent item is then given a “current-menu-parent” class you can target in your active theme’s style as well.
When designing your website, you know advance which pages will appear in the navigation menu and therefore, the “slug” of each one of those pages. With that information, you have control of the amount of space taking by each top-level menu item with pixel-precision. That helps you achieve a better alignment of that menu on the website.
This plugin allows you to use a precise class name for each item in the menu instead of relying on the generic class names generated by WordPress by default. Get more control, predictable CSSS styles, and cleaner HTML.
- From the left sidebar of WordPress admin panel, go to Plugins > Add New.
- Once in the “Add Plugins” page, type “wpxp clean navigation links” in the search box from the far right.
- Install the “WPXP Clean Navigation Links” plugin by clicking the “Install Now” button.
- Then click the “Activate” button to start using this plugin
Aternatively, you can head over to the WordPress.org website to download the WPXP Clean Navigation Links and then upload it to your website.
Once the plugin is active, no additional settings is required.
Leave a review to help us improve this plugin. We appreciate your feedback.