WordPress.org

Support

Support » Plugins and Hacks » JQuery Mega Menu Widget » [Resolved] Displaying menu not as a widget, but at the top main menu

[Resolved] Displaying menu not as a widget, but at the top main menu

  • jasonpaulweber

    @jasonpaulweber

    Member

    I noticed on the designchemical website, a person asked:

    Hi, how can i set your megamenu, like the main menu of my site?

    Your response was:

    Just follow the instructions on the plugin home page. It should contain all the info required to set up a standard drop down menu

    I’m not really understanding your response — well, at least where the instructions are on the plugin home page (which is where it was asked, I believe).

    Basically, I’d like this not to show up in the sidebar widget – I’d like it to replace my current custom menu in my header! Is this possible? I hope it is; I really like this plugin.

    Thanks!

    http://wordpress.org/extend/plugins/jquery-mega-menu/

Viewing 15 replies - 1 through 15 (of 63 total)
  • jasonpaulweber

    @jasonpaulweber

    Member

    I read more into the documentation, and created a widget area just after the header, and have things working perfectly now.

    So this issue is resolved. 5 stars in my book — wonderful job, and thanks for sharing!

    Jason

    Jason, I’m new to this whole WordPress world, can you point me to the documentation you used to create a widget area just after the header. Do you also have to remove the current menu from your theme? Is it a free theme or one purchased?

    jasonpaulweber

    @jasonpaulweber

    Member

    1. Go into your Wp-Admin
    2. Go to Appearances >> Editor
    3. Find the file functions.php
    4. Before the closing ?>, add the following lines of code:
      if ( function_exists(‘register_sidebar’) ){
      register_sidebar(array(
      ‘name’ => ‘my_mega_menu’,
      ‘before_widget’ => ‘<div id=”my-mega-menu-widget”>’,
      ‘after_widget’ => ‘</div>’,
      ‘before_title’ => ”,
      ‘after_title’ => ”,
      ));
      }
    5. Now edit the header.php file
    6. Find the location where you want to place the menu and add the following code to the header.php file:
      <?php /* Widgetized sidebar */
      if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘my_mega_menu’) ) : ?><?php endif; ?>

    Save all the changes, and you should now be able to go into Appearances >> Widgets >> My_Mega_Menu_Widget and then drag the jquery_mega_menu widget into the my_mega_menu_widget box.

    For more information, see Design Chemical’s documentation on how to create the new widget area, although it just says what I just wrote.

    Ok I did find the doc that has that but when i try to use it with the theme I get red lines when I add the under the php endif

    my bad got it to work!

    [Please stop posting in uppercase & shouting at us. Post de-capped.]

    it still doesn’t work. And I don’t know why…

    My website http://dungeon-rpg.com/

    jasonpaulweber

    @jasonpaulweber

    Member

    Need more information that that Douby … are you following the instructions precisely as I just explained to Mvaughn?

    I did this :

    Go into your Wp-Admin
    Go to Appearances >> Editor
    Find the file functions.php
    Before the closing ?>, add the following lines of code:
    if ( function_exists(‘register_sidebar’) ){
    register_sidebar(array(
    ‘name’ => ‘my_mega_menu’,
    ‘before_widget’ => ‘<div id=”my-mega-menu-widget”>’,
    ‘after_widget’ => ‘</div>’,
    ‘before_title’ => ”,
    ‘after_title’ => ”,
    ));
    }
    Now edit the header.php file
    Find the location where you want to place the menu and add the following code to the header.php file:
    <?php /* Widgetized sidebar */
    if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘my_mega_menu’) ) : ?><?php endif; ?>

    exactly this, i add my code to see the result and that doesn’t work. I have a simple list the same that wordpress do already with “menu”.

    I have a similar issue. I added both the snippets into places but I cannot get an additional widget area!

    I have attempted the fix provided by jasonpaulweber and can almost get this working but not quite. It places it on the page but in the incorrect spot, no matter where I place the code. I am using the attitude theme. Does anyone know where I would place this code to replace the main menu for that theme? I have a slider and it either wants to place the menu at the top of the page or below the slider.

    jasonpaulweber

    @jasonpaulweber

    Member

    Places what on the page? The image? Then you’ll need to adjust the sizes or margins. Also, you should be using the pictures on your level 2 menu items.

    Can you please provide a link so I can Firebug it and see what’s going on?

    jasonpaulweber

    @jasonpaulweber

    Member

    Yes, Douby … designchemical says right on their website how to add a widget area for the mega menu …. But getting the pictures to display requires a little tinkering, and putting the pictures on your 2nd level menu items.

    My apologies, I should have been more clear. I was speaking of the entire menu. No matter where I place the recommended code:

    <?php /* Widgetized sidebar */
    if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘my_mega_menu’) ) : ?><?php endif; ?>

    in the header.php file, it either places the menu below the slider or at the top of the page and leaves the primary navigation as is.

    Here is a link: http://dev.squarescrub.com/square_scrub/

    Thanks for your help!

    jasonpaulweber

    @jasonpaulweber

    Member

    Can you send me your header.php? My e-mail is my username @ gmail dot com … unless you post it in here using Pastebin.

    Somewhere in your header.php is your regular menu. You’ll need to replace that with the widgetized mega menu. But if you send me your header.php, I’ll do it. Just keep a backup of the file so you can always revert.

    Plugin Author remix4

    @remix4

    @jasonpaulweber thanks for the help!

Viewing 15 replies - 1 through 15 (of 63 total)
  • The topic ‘[Resolved] Displaying menu not as a widget, but at the top main menu’ is closed to new replies.
Skip to toolbar