How can add the Bilingual Linker to a menu?
-
I’m trying to add the bilingual linker to a menu but I don’t know how to do it. I found this code that successfully adds list items to my menu via the functions.php file but I don’t know how to include the function for the bilingual linker:
add_filter('wp_nav_menu_items','search_and_lang', 10, 2); function search_and_lang( $nav, $args ) { if( $args->theme_location == 'top-menu' ) return $nav." <li class='menu-header-search'> <?php the_bilingual_link(); ?> </li> <li class='menu-header-search'> <form action='https://example.com/' id='searchform' method='get'><input type='text' name='s' id='s' placeholder='Search'></form> </li>"; return $nav; }
Any help will be appreciated. Thanks!
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
- The topic ‘How can add the Bilingual Linker to a menu?’ is closed to new replies.