How to Add a Custom Navigation Menu in WordPress

How to Add a Custom Navigation Menu in WordPress

If you’ve been working with WordPress as long as I have then it is inevitable that you will need to add custom features and functionality to your WordPress site. It is easier than you think to add your own custom navigation menu in WordPress.

You will need to edit the functions.php file, and the php file where you want to add your custom navigation menu. This could be the header.php file, the index.php file, the archive.php file, or the footer.php file. First, we need to add a line of code at the bottom  of the functions.php file in order to enable the custom menu. Copy and paste this line of code:

add_theme_support( 'menus' );

Now that you have enabled this, you can create custom menus in the Appearance section of your WordPress Admin Area. You can order your menu any way that you’d like. You can include posts, pages and custom urls in your custom navigation menu in WordPress. To add your custom navigation menu in WordPress wherever you’d like, simply paste the following code:

<?php wp_nav_menu( array( 'sort_column' => 'menu_order', 'container_class' => 'menu-footer' ) ); ?>

In the PHP above you are asking for a WordPress navigation menu, and what the code is telling WordPress to do is to use the sort order that you had setup for your menu under the Appearance menu. this takes the order of the menu itself and displays your menu items in that order. As you add menus to your site, you will see WordPress update with menu locations where you can specify what menus to use and where they will be placed within your site. Notice the “+” symbol in the menu section. Here, you can create as many menus as you’d like, just be sure to name your custom menu something that you will recognize, to make it easy to remember where you want to place it.



Next, the container class determines the class that you will use in your css to style this menu. The reason that you do it this way, is because you might have several menus in different places, so this makes it easy for you to style in your CSS Stylesheet.

As you can see, this makes it really easy to implement your own custom navigation menu in WordPress quickly and easily. This is just one of the things that you can do to customize your WordPress site and make it easy for your visitors to find what they are looking for.

Your opinion is important to me. Be heard!

Dreamweaver Fireworks Flash Illustrator Indesign Lightroom Painter Photoshop Quark Typography
Circular Text in Illustrator

Circular Text in Illustrator Type plays such an important role in...

fill and stroke grids in Illustrator
Make Easy Grids in Illustrator

Easy Grids in Illustrator We all like easier ways to do...

High Pass Filter: Settings
Sharpen Images Using the High Pass Filter

Using the High Pass Filter There are many different ways to...

Parallels Free Html5 Template

Parallels Free Html5 Template One page templates have gained popularity in...

UI Hero Free Html5 Template

UI Hero Free Html5 Template Sometimes, you just come across a...

FlatMate Free Html5 Template

FlatMate Free Html5 Template Flat design has been popular for a...

50 Innovative Technology WordPress Themes

Technology WordPress Themes Technology WordPress themes can help you to answer...

Top 30 Farming and Agriculture WordPress Themes

Agriculture WordPress Themes How to start your farming and agriculture business...

50 Art & Culture WordPress Themes

50 Amazing Art and Culture WordPress Themes with a Twist ”...

Top 10 WordPress Themes for Law Firms

Whenever you think of lawyers you think sharp suits, sharper tongues,...