• Resolved Dinamicore

    (@dinamicore)


    Hello:

    I used below codes to to add a shortcode, and the css to style. Both working fine:

    // PHP: Add this to your functions.php file
    
    function polylang_flags_shortcode() {
        ob_start();
        pll_the_languages(array('show_flags'=>0,'show_names'=>1));
        $flags = ob_get_clean();
        return '<ul class="polylang-flags">' . $flags . '</ul>';
    }
    add_shortcode('POLYLANG', 'polylang_flags_shortcode');
    
    /* CSS Polylang Flags/Names Inline */
    .polylang-flags {
      list-style-type: none;
      margin: 0;
      padding: 0;
    }
    .polylang-flags li {
        display: inline;  
    }
    

    Now, I need to hide the current language.

    Please advice on a code to add or modify.

    Thanks

    • This topic was modified 6 years, 8 months ago by Dinamicore.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide current language’ is closed to new replies.