Flags of languages from WPML plug-in

  • PaulN

    #4371

    How to insert into the top field of a subject instead of search flags of languages from WPML plug-in?

    Admin

    Syahir Hakim

    #28040

    Can you please clarify your question further? Not sure I get what you’re trying to achieve here.

    Also, if the question concerns the WPML plugin, it’s better to post the question at their support forum instead, as they are definitely more familiar with their own software than anybody else.

    PaulN

    #28041

    did inquiry, such answer came:

    Please use the following code into your theme’s functions.php file.

    The below code will add language switcher with only flags to your menu.

    // Filter wp_nav_menu() to add additional links and other output

    function new_nav_menu_items($items,$args) {

    if (function_exists(‘icl_get_languages’)) {

    $languages = icl_get_languages(‘skip_missing=0’);

    if(1 < count($languages)){

    foreach($languages as $l){

    if(!$l){

    $items = $items.'<li class=”menu-item”>'.$l.'‘;

    }

    }

    }

    }

    return $items;

    }

    add_filter( ‘wp_nav_menu_items’, ‘new_nav_menu_items’,10,2 );

    but it is impossible to insert into a subject. that in the top field of a subject flags were reflected

    Admin

    Syahir Hakim

    #28042

    Er… I’m still not getting it. Can you please clarify what do you refer to as “subject”, “subject flags”, and “top field of subject flags”? If you can make a screenshot that will be very helpful as well.

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

  • You must be logged in to reply to this topic.