Edit Sticky menu

  • Author
    Posts
  • #2469

    Forestyura
    Participant

    I creater two menu in header,one below the other. How can I add a second menu in the sticky menu?

    #2470

    Andrew Misplon
    Keymaster

    Hi Forestyura

    Thanks for reaching out.

    How have you added a second menu to the header? What method did you use to achieve that?

    #2471

    Forestyura
    Participant

    I add menu in function.php:
    register_nav_menus( array(
    ‘secondary’ => __( ‘Top Bar Menu’, ‘ultra’ ),
    ‘top-bar-social’ => __( ‘Top Bar Social Menu’, ‘ultra’ ),
    ‘primary’ => __( ‘Primary Menu’, ‘ultra’ ),
    ‘footer’ => __( ‘Bottom Bar Social Menu’, ‘ultra’ ),
    ‘secondprimary’ => __( ‘Second Menu’, ‘ultra’ ),
    ) );
    , and added a menu block in header.php
    <?php wp_nav_menu( array( ‘theme_location’ => ‘primary’ ) ); ?>

    #2473

    Andrew Misplon
    Keymaster

    Thanks for the update.

    These sorts of changes are quite far into the custom development territory so not really part of normal theme support. We’ll do our best to advise.

    A friendly reminder to work from within a child theme to keep your changes update safe. All WordPress.org themes completely overwrite their own folders during the update process. If you make changes to the parent theme and run a theme update, all changes will be lost.

    More about child themes
    A starter child theme for Ultra

    Once you’ve registered your menu in the child functions.php file, make a copy of header.php and insert it in the child theme folder.
    Next go to /inc/template-tags.php and locate line 129. Copy that entire function into your child theme functions.php file. The function starts with:

    if(!function_exists('ultra_site_header_sentinel')):
    and ends with:

    }
    endif;

    The entire function must be copied into the child functions.php file. You can then add your second menu.

    There will most likely be extra CSS adjustments required. If you can resolve the above then you’d be most of the way there.

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

You must be logged in to reply to this topic.

Scroll to top