Header Shadow Image


The current theme does not natively support menus

The current theme does not natively support menus, but you can use the "Custom Menu" widget to add any menus you create here to the theme's sidebar.

“Your theme supports 0 menus. Select which menu appears in each location”

Reading further on the following pages, we can enable the menus using these functions:

http://codex.wordpress.org/Function_Reference/register_nav_menu
http://codex.wordpress.org/Function_Reference/register_nav_menus

To fix this using the above, in your wordpress theme (create the files if they don't exist.):

header.php (Right after body tag)
<?php wp_nav_menu('menu=Header'); ?>

functions.php (Right at the very top)
<?php
        if (function_exists('add_theme_support')) {
                register_nav_menus( array( $location => $description ) );
        }
?>

 

CSS Styles come later and can be applied

After that, you should see:

Your theme supports 1 menu. Select which menu you would like to use.

and should be able to create and customize your menus using the wordpress admin panel for your blog.  Here are some alternatives how to enable and apply CSS as well to style your menus:

The alternative to use if the above doesn't work is the following:

functions.php (at the top of the file)
<?php
        if ( function_exists( 'register_nav_menus' ) ) {
                register_nav_menus( array('MDS MENU' => 'MDS MENU' ) );
        };

?>

header.php (placed where you want the menu to appear)
<?php
        wp_nav_menu ( array (
                'theme_location' => '' ,
                'container' => '' ,
                'container_class' => '' ,            
                'menu_class' => '',
                'menu_id' => 'menu' ,
                'menu' => 'MDS MENU'
                )
        );
?>

Notice the menu_id.  This ID specifies the CSS ID of the functions to apply to your menu.  For example:

#main       {
        height: 30px;
        margin: 0 0 10px;
}

As an example.  The generated HTML menu code would look like this:  <ul id="menu"> ….  In my case, theme_location property did not work but your tests may prove otherwise.


Cheers,
TK

3 Responses to “The current theme does not natively support menus”

  1. Thanks it was really helpful. 

  2. Hi there, I tried your method and I think it worked but the menu isn't applying my CSS. I feel like I have done something wrong.

    If you could take a look at my code it would be greatly appreciated :: http://jaredkindred.com/wordpress/

  3. Sounds a bit familiar to what I had went through.  The way I went about resolving this is to look at my error and access log files.

    -rw-r–r–. 1 root root 3475 May 19 04:15 /var/log/httpd/error_log
    -rw-r–r–. 1 root root 0 Mar 26 03:13 /var/log/httpd/access_log
     

    particularly the error_log files (My host didn't allow it but it allows me to look at my access_log file.  I configured a LAMP environment on my own Linux Server to preconfigure my wordpress before I uploaded my site to the web so I could see my error_log and access_log files.)

    Often in the error_log file you can see messages such as 'file not found' which might explain why your style sheets are not being applied.  Also, try the php debugging options which could print out more information:
     

    error_reporting(E_ALL);
    ini_set('display_errors', True);

     

    Give that a try and take a look in those log files for messages that could move you further along.

     

    EDIT: May 21 2013 – 9:11PM

    If you have the resources, setup the LAMP ( Linux, Apache MySQL, PHP ) environment on your development server and maintain a copy of the site under /var/www/html/jaredkindred.com folder.  Once you are happy with how your site functions, just copy the entire content of that site to the webspace of your hosting company.  This will let you iron out any issues without loosing functionality on your site.

    Cheers,
    TK

Leave a Reply

 

     
  Copyright © 2003 - 2013 Tom Kacperski (microdevsys.com). All rights reserved.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License