I am new in WordPress world (before now I always used Joomla and some other old CMS)

Now I am testing WordPress and I have some doubts about how create a navigation menu in my WP Site.

This is my test site (that at this time have not content but only a template): http://www.scorejava.com/WPTest/

I plan to create articles organized by category and I would have an horizontal top menu like this WP blog: http://viralpatel.net/blogs/

As you can see in this second WP site there is an horizzontal top menu that contains some voices, like “Java”, clicking on this voice appear a page showing all the Java posts preview.

As you can see this menu work also with submenu, for example, moving the mouse cursor on Java appear the “Java EE” subvoice.

What can I do to have something like this in my WordPress?

And if I want a similar vertical menu in my right sidebar?

4 Answers
4

You have to register menu’s in your theme’s functions.php unless you only wish to use them in widgetised areas.

As an example:-

<?php register_nav_menu('main', 'Main Navigation Menu'); ?>

Then you have to call that menu into your template file where you wish it to be displayed, so for example, in the header (header.php):-

<?php wp_nav_menu( array('main' => 'Main Navigation Menu' )); ?>

Then you can construct the menu in the WordPress back office under ‘Appearance’ > ‘ Menu’s’ including necessary pages and categories as you wish.

You can set the menu to auto include top level pages as they are created as well.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *