Click here to Skip to main content
13,510,033 members
Rate this:
Please Sign up or sign in to vote.
I have created my own theme in wordpress and i have added below mentioned pages in that theme


In functions.php i have written this code
function register_my_menu()
register_nav_menu('Primary-Menu',__( 'Primary Menu' ));

add_action( 'init', 'register_my_menu' );
/* end of code */
 /*by writing this line menu displayed on theme  menu code finished */

  register_sidebar(array (
'name' => __( 'Primary Widget Area'),//__ returns the translated text
'id' => 'widget-name',
'description' => __( 'The primary widget area'),
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
'after_widget' => "</li>",
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
add_action( 'widgets_init', 'register_sidebar' );//function to load my widget

    if ( function_exists('register_sidebar') )
    register_sidebar(array('name'=>'Welcome Message','before_widget' => '','after_widget' => '',
                    'before_title' => '<h1>','after_title' => '</h1>',));
    register_sidebar(array('name'=>'Top Ten Articles','before_widget' => '','after_widget' => '',
                    'before_title' => '<h4 class="top-ten">','after_title' => '</h4>',));
    register_sidebar(array('name'=>'Reviews','before_widget' => '<div id="reviews">','after_widget' => '</div>',
                    'before_title' => '','after_title' => '',));

My menu and sub menus are visible on theme but sub menus are not coming under the mentioned menu.
What to do??
Thanx in advance
Posted 7-May-14 21:40pm
Sunasara Imdadhusen 8-May-14 5:34am
I think there is CSS issue, please share CSS code as well
Ashishbhatt007 15-May-14 2:01am
what is style in your css file, can you share your code, so i can give you better answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.180417.1 | Last Updated 8 May 2014
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100