WordPress how to

Home Forums Older releases 0.9.x WordPress how to

This topic contains 1 reply, has 2 voices, and was last updated by  admin 3 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2352

    inick
    Participant

    Hello,

    i already install smartmenu on a simple website and it was simple and it’s awesome, simply the best there is. Now i am trying to install this on my wordpress project.

    I am not a very good coder so i am often lost. Here what i gather so far, if someone or the admin could just fill in the blank and correct me, this post would probably help alots of newb like me.

    Step 1. Download and install. dhu.

    step 2. Copy to header.php this block :

    <!-- START SmartMenus -->
    <!-- jQuery -->
    <script src="jquery-1.4.4.min.js" type="text/javascript"></script>
    <!-- SmartMenus jQuery plugin -->
    <script src="jquery.smartmenus.js" type="text/javascript"></script>

    <!-- SmartMenus core CSS (required) -->
    <link href='sm-core-css.css' rel='stylesheet' type='text/css' />
    <!-- "sm-blue" menu theme (optional, you can use your own CSS, too) -->
    <link href='sm-blue/sm-blue.css' rel='stylesheet' type='text/css' />
    <!-- END SmartMenus -->

    Step 3 : As read in the forum (emsgeorge) i add to function.php :

    //* Add 'sm' class to main menu
    function smartmenu_wp_nav_menu_args( $args ) {
    $args['menu_class'] .= " sm";
    return $args;
    }
    add_filter( 'wp_nav_menu_args', smartmenu_wp_nav_menu_args);

    And that where i fail to understand the the next part :

    Admin tell to add this :

    jQuery("#menu-main-menu").addClass('sm');

    and this :

    <?php wp_nav_menu( array( 'menu' => '...', 'menu_id' => 'menu-main-menu', 'menu_class' => 'sm' ... ) ); ?>

    And i just dont know where.

    Since this new website is on wordpress, i guess it was done once, so please, help us!

    tanxs!

    #2370

    admin
    Keymaster

    Sorry for this delay, it’s been our Easter the past few days and I just wasn’t able to reply earlier!

    Admin tell to add this :

    jQuery("#menu-main-menu").addClass('sm');

    This should be added to some of the JS files that your theme uses. To be more precise, it should be like this so it is executed ondomready:

    jQuery(function() {
    	jQuery("#menu-main-menu").addClass('sm');
    });

    and this :

    <?php wp_nav_menu( array( 'menu' => '...', 'menu_id' => 'menu-main-menu', 'menu_class' => 'sm' ... ) ); ?>

    This should be added in the PHP include file that currently outputs your main menu. It might possibly be “header.php” but I am not familiar with the theme you use so it might be some other file.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Register

You will be emailed a link to set your password.

Login

Lost password?