WAJ Admin Menu

WAJ Admin Menu

Wordpress plugin

Install on Wordpress

App Details

Creates menu in WordPress’s Appearances -> Menus & generates list HTML from it.

Allows custom-set classes & IDs for elements for easier styling & has easy way to automatically add “Skip to Content” link for screen-reader users.

Usage

Since admin menus need to be created before initialization to work in the WordPress admin & used later in template files to print, admin menu objects are handled through static methods in the WPAdminMenuManager singleton class.

1st, before admin loads, call the “createAdminMenu” method on WPAdminMenuManager with a slug & title as the 1st 2 mandatory, & a hash map o’ other attributes as an optional 3rd argument. This will make the menu appear under the given name in Appearances -> Menus in the WordPress admin.

Then you can print the menu through PHP in template files or shortcodes in WordPress content editors.

= PHP

To use through PHP, just call the “printAdminMenu” method on the WPAdminMenuManager class with the mandatory argument o’ the slug representing the admin you want to print ( given when creating the menu earlier ) & an optional hash map o’ attributes to o’erride the ones given when creating the menu, if you want to print the same menu in different places with different element classes, for instance.

= Shortcodes

To print through shortcodes, just use the shortcode [admin-menu slug=”%slug%”], with optional extra attributes to o’erride the attributes given when creating the menu.

WPAdminMenuManager also has 2 templates for easier creation o’ admin menus, a header & footer template. Just call WPAdminMenuManager::createHeaderMenu() or WPAdminMenuManager::createFooterMenu() respectively to create them & either call WPAdminMenuManager::printHeaderMenu() or WPAdminMenuManager::printFooterMenu() or use the shortcodes [header-nav] or [footer-nav].

If you try to print a menu that hasn’t been created yet, it will print nothing.

Valid attributes for admin menus ( all are optional ):

  • “nav”: represents the nav element that holds everything. Should hold a hash map with either a class or id attribute, or both.
  • “ul”: represents ul element. Should hold the same as “nav”.
  • “li”: represents li element. Should hold a hash map with a class attribute.
  • “a”: represents a element. Should hold the same as “li”.
  • “subnav”: represents child ul elements for multilevel menus. Should hold the same as “li”.
  • “subitem”: represents child li elements for multilevel menus. Should hold the same as “li”.
  • “sublink”: represents child a elements for multilevel menus. Should hold the same as “li”.
  • “parent-link”: represents a elements in top-level li elements that hold child navs. Should hold the same as “li”.
  • “skip-to-content”: automatically adds “skip to content” link. Should be a string that will be the anchor ( without the # ) that the “skip to content” link should go to. If not added, “skip to content” link will not be added.

Shortcode attributes that act as these:

  • nav-class
  • nav-id
  • ul-class
  • ul-id
  • li-class
  • a-class
  • subnav-class
  • subitem-class
  • sublink-class
  • parent-link-class
  • skip-to-content

Example

// functions.php

declare( strict_types = 1 ); namespace MyTheme { use WaughJ\WPAdminMenuManager\WPAdminMenumanager; // Make sure this is initialized early, // so WordPress Admin knows that this menu is set up. WPAdminMenuManager::createAdminMenu ( 'extra-menu', 'Extra Menu', [ 'nav' => [ 'class' => 'extra-menu-nav', 'id' => 'extra-menu-nav' ], 'ul' => [ 'class' => 'extra-menu-list', 'id' => 'extra-menu-list' ], 'li' => [ 'class' => 'extra-menu-item' ], 'a' => [ 'class' => 'extra-menu-link' ], 'subnav' => [ 'class' => 'extra-menu-subnav' ], 'subitem' => [ 'class' => 'extra-menu-subitem' ], 'sublink' => [ 'class' => 'extra-menu-sublink' ], 'parent-link' => [ 'class' => 'extra-menu-parent-link' ], 'skip-to-content' => 'top' ] ); } // inc/header.php <?php declare( strict_types = 1 ); namespace MyTheme { use WaughJ\WPAdminMenuManager\WPAdminMenumanager; ?> <header class="header"> <?php WPAdminMenuManager::printAdminMenu( 'extra-menu' ); ?> </header> <?php } 

Pricing

Starting from $0 per month.

Check Out the Events Calendar Widget

By Common Ninja

Events CalendarTry For Free!

App Info

Rating

Reviewers

No reviews

Tags

admin menu
html
nav

Developed By

waughjai

Quick & Easy

Find the Best Wordpress plugins for you

Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!

Testimonial

Testimonial plugins for Wordpress

Contact Form

Contact Form plugins for Wordpress

Maps

Maps plugins for Wordpress

Translation

Translation plugins for Wordpress

Chat

Chat plugins for Wordpress

Slider

Slider plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Contact

Contact plugins for Wordpress

Galleries

Galleries plugins for Wordpress

SEO

SEO plugins for Wordpress

Forms

Forms plugins for Wordpress

Comments

Comments plugins for Wordpress

Backup

Backup plugins for Wordpress

Privacy

Privacy plugins for Wordpress

Optimize

Optimize plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Comments

Comments plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Video Player

Video Player plugins for Wordpress

popup

popup plugins for Wordpress

SiteMap

SiteMap plugins for Wordpress

Payment

Payment plugins for Wordpress

Coming Soon

Coming Soon plugins for Wordpress

Inventory

Inventory plugins for Wordpress

Testimonials

Testimonials plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Membership

Membership plugins for Wordpress

Forms

Forms plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Sliders

Sliders plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Security

Security plugins for Wordpress

Ads

Ads plugins for Wordpress

Music Player

Music Player plugins for Wordpress

Countdown

Countdown plugins for Wordpress

Email Marketing

Email Marketing plugins for Wordpress

Membership

Membership plugins for Wordpress

Ecommerce

Ecommerce plugins for Wordpress

Customer Support

Customer Support plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Common Ninja Apps

Some of the best Common Ninja plugins for Wordpress

Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.

Events Calendar for Wordpress logo

Events Calendar

Add an events calendar to your site so visitors can view upcoming activities, improving engagement and event visibility.

Highlighted Headlines for Wordpress logo

Highlighted Headlines

Enhance titles with highlighted headlines that use custom colors, animations, and styles to draw attention and help visitors notice key messages.

Subscription Button for Wordpress logo

Subscription Button

Use a subscription button to streamline recurring payments, simplify signup, and help increase conversions with seamless PayPal or Stripe integration.

Catalog for Wordpress logo

Catalog

Create and customize product catalogs with a catalog widget that organizes items clearly, improves browsing, and helps visitors explore your offerings easily.

Appointment Booking for Wordpress logo

Appointment Booking

Manage appointments with an appointment booking widget that lets visitors schedule easily, syncs calendars, sends reminders, and creates a smoother booking experience.

Back to Top Button for Wordpress logo

Back to Top Button

Back to top button that improves navigation, speeds up browsing, and helps visitors move smoothly through long pages for a better user experience.

Social Media & RSS Feeds for Wordpress logo

Social Media & RSS Feeds

Add social media and RSS feeds to your site to display fresh content, grow your online presence, and keep visitors engaged with real time updates.

Reviews Badge for Wordpress logo

Reviews Badge

Use a reviews badge to highlight your ratings, build trust at a glance, improve credibility, and help increase conversions across your site.

Restaurant Menu for Wordpress logo

Restaurant Menu

Create an online restaurant menu that organizes dishes, highlights key items, and helps visitors explore options with confidence.

Announcements for Wordpress logo

Announcements

Add announcements to your site to share important updates, keep visitors informed, and guide them toward actions that support engagement and conversions.

RSS Feed Slider for Wordpress logo

RSS Feed Slider

Show RSS feed updates with an RSS feed slider that auto updates, displays posts in a smooth layout, and keeps visitors engaged.

Flash Cards for Wordpress logo

Flash Cards

Create interactive flash cards that present questions and answers in a clear, customizable format to support learning, training, and user engagement.

More plugins

plugins You Might Like

Discover Apps By Platform

Discover the best apps for your website

WordPress
Wix
Shopify
Weebly
Webflow
Joomla
PrestaShop
Shift4Shop
WebsiteX5
MODX
Opencart
NopCommerce

Common Ninja Search Engine

The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!

Multiple platforms