• My site link: https://www.fiorelife.com/site/home

    For WP ADMIN:
    Login: fioreadmin
    PW: Fiore.living<2015>Fiore.living

    FTP:
    HOST: https://ftp.dentrodirectbuild.com
    LOGIN:[email protected]
    PW:@Nkita123

    I have already installed AWESOME STICKY HEADER (free version) for my homepage where I also need to put EN / FR that is language option for my site and the code is:

    `<div class=”lang”>
    <ul>
    <li><a href=”<?php echo get_site_url().”/lang-changer.php?lang=en”; ?>” <?php if($wp_session[‘lang’] == ‘en’){?>class=”active”<?php }?>>en</a></li>
    <li><a href=”<?php echo get_site_url().”/lang-changer.php?lang=fr”; ?>”<?php if($wp_session[‘lang’] == ‘fr’){?>class=”active”<?php }?>>fr</a></li>
    </ul>
    </div>
    <div class=”topmenu”>
    <!–start topmenu–>
    <div id=”smoothmenu1″ class=”ddsmoothmenu”>
    <?php
    if($wp_session[‘lang’] == ‘en’){
    wp_nav_menu(array(‘theme_location’ => ‘primary’, ‘container’ => false, ‘items_wrap’ => ‘<ul id=”%1$s” class=”%2$s”>%3$s</ul>’,’container_class’ => ‘ddsmoothmenu’,));
    }
    else if($wp_session[‘lang’] == ‘fr’){
    wp_nav_menu(array(‘theme_location’ => ‘frenchmenu’, ‘container’ => false, ‘items_wrap’ => ‘<ul id=”%1$s” class=”%2$s”>%3$s</ul>’,’container_class’ => ‘ddsmoothmenu’,));
    }
    ?>
    </div>
    </div>
    <!–end topmenu–>
    Can you please help me to get it on my header ?
    Also I need the scrolling header only on homepage and on ther pages it should be fixed to top all the time including EN/FR.

    Please reply soon.
    Thanks.

    https://www.ads-software.com/plugins/awesome-sticky-header/

Viewing 1 replies (of 1 total)
  • Plugin Author Marko Jakic

    (@markzero)

    There are filters available in this plugin, like asmh_middle_menu_before and asmh_middle_menu_after, which means to put HTML content before or after main menu.

    So to put anything before the main menu and to float it right, you can do this:

    add_filter('asmh_middle_menu_before', function() {
        return '<div style="float:right;">Content</div>';
    });
Viewing 1 replies (of 1 total)
  • The topic ‘Need to include menu items linking php code’ is closed to new replies.