Title: Need to include menu items linking php code
Last modified: August 31, 2016

---

# Need to include menu items linking php code

 *  [ankitamaskara](https://wordpress.org/support/users/ankitamaskara/)
 * (@ankitamaskara)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/need-to-include-menu-items-linking-php-code/)
 * My site link: [http://www.fiorelife.com/site/home](http://www.fiorelife.com/site/home)
 * For WP ADMIN:
    Login: fioreadmin PW: Fiore.living<2015>Fiore.living
 * FTP:
    HOST: [http://ftp.dentrodirectbuild.com](http://ftp.dentrodirectbuild.com)
   LOGIN:jgarrett@dentrodirectbuild.com 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://wordpress.org/plugins/awesome-sticky-header/](https://wordpress.org/plugins/awesome-sticky-header/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Marko Jakic](https://wordpress.org/support/users/markzero/)
 * (@markzero)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/need-to-include-menu-items-linking-php-code/#post-7145039)
 * 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.

 * ![](https://ps.w.org/awesome-sticky-header/assets/icon-256x256.png?rev=1214840)
 * [Awesome Sticky Header by DevCanyon](https://wordpress.org/plugins/awesome-sticky-header/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/awesome-sticky-header/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/awesome-sticky-header/)
 * [Active Topics](https://wordpress.org/support/plugin/awesome-sticky-header/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/awesome-sticky-header/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/awesome-sticky-header/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Marko Jakic](https://wordpress.org/support/users/markzero/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/need-to-include-menu-items-linking-php-code/#post-7145039)
 * Status: not resolved