I am pretty new in WordPress blog and I am developing a blog with this template: http://scorejava.com/wordpress351

As you can see at the top of the page there is a "menù" that only show the page in the site (at this moment: "Home" and "Pagina di esempio").

This menù is showed by the following lines of code into the header.php file:

<?php wp_list_pages('title_li=&depth=1'); ?>

So I think that this is not a true menù but only a list of the statics pages present on my blog.

If, in the administrator dashboard I go to the menù section in the "Position of themes" square say me that: "This theme has no support for menus but it is possible use the personalized menu widget to add every created menu in the sidebar"

So I think that my template have no definied a true menù section on the top (but only a list for the static pages). Can I add a true section where add a true menu? How can I do?




1 Answer 1

  1. You need to edit functions.php andding the following line

<?php register_nav_menu( 'primary', 'Primary Menu' ); ?>

  1. Then go in admin section Apearence-Menus and create one menu

  2. In the header replace <?php wp_list_pages('title_li=&depth=1'); ?> for example (the primary menu) with:

<?php wp_nav_menu( array( 'theme_location' => 'primary')); ?>

more details for nav_menu here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.