Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

How to Register Navigation Menus of our Custom Theme in WordPress? Part-7

How to Register Navigation Menus of our Custom Theme in WordPress?

What are the Navigation Menus?

Navigation-Menus are customizable menus in your theme. They allow users to add Pages, Posts, Categories, and URLs to the menu. To create a navigation menu you’ll need to register it, and then display the menu in the appropriate location in your theme.

  1. Create a functions.php file into the Customer Theme folder.

Register menu

2. Use of register_nav_menus() to register the menu. Register navigation menu locations for a theme. The Primary menu and Footer menu are the names of the menus. The “init” is the action. About Action Hooks go to https://developer.wordpress.org/plugins/hooks/actions/ .

3. Go to Dashboard and Click Appearance->Menus.

Menus section of Custom Theme has appeared now.

4. For displaying the Primary menu and Footer menu, we have to create the Header menu for Custom Theme and click Create Menu.

Now, we can see the Primary menu and Footer menu has created.

Thanks

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.