Title: hide the current language switcher without using widget
Last modified: March 19, 2018

---

# hide the current language switcher without using widget

 *  [anasandia](https://wordpress.org/support/users/anasandia/)
 * (@anasandia)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/hide-the-current-language-switcher-without-using-widget/)
 * This widget is awesome!, i just have two questions.
 * How can i hide the current language switcher? the thing is that i´m not using
   the widget area, i put this code before the menú
    `<?php if (function_exists('
   pll_the_languages')): ?> <ul class="monstro-polylang"><?php pll_the_languages(
   array('show_flags'=>1,'show_names'=>0));?></ul> <?php endif; ?>`
 * Something weird happend when i change the language always return me to the home
   page, i want to change the language but stay in the same page. How can i do it?
 * Many thanks in advance!!!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fhide-the-current-language-switcher-without-using-widget%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Česlav Przywara](https://wordpress.org/support/users/chesio/)
 * (@chesio)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/hide-the-current-language-switcher-without-using-widget/#post-10107437)
 * Hi [@anasandia](https://wordpress.org/support/users/anasandia/),
 * You want to use `hide_current` argument, see: [https://polylang.wordpress.com/documentation/documentation-for-developers/functions-reference/#pll_the_languages](https://polylang.wordpress.com/documentation/documentation-for-developers/functions-reference/#pll_the_languages)
 * Using your example:
 *     ```
       <?php if (function_exists('pll_the_languages')): ?>
         <ul class="monstro-polylang">
           <?php pll_the_languages(array('show_flags' => 1, 'show_names' => 0, 'hide_current' => 1));?>
   
       <?php endif; ?>
       ```
   
 * As for your second question/problem: it’s hard to tell what’s wrong without more
   information (for example URL of page where the problem happens).
 *  [Česlav Przywara](https://wordpress.org/support/users/chesio/)
 * (@chesio)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/hide-the-current-language-switcher-without-using-widget/#post-10107458)
 * My apologies, I just noticed the link to your page below the post 😉
 * Your website is essentialy one-pager (ie. it relies on anchors like #page-name
   for navigation). I don’t know if it’s possible to configure Polylang to “translate”
   the anchors. But maybe someone else would be able to help.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘hide the current language switcher without using widget’ is closed to
new replies.

 * ![](https://ps.w.org/polylang/assets/icon-256x256.png?rev=3433336)
 * [Polylang](https://wordpress.org/plugins/polylang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/polylang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/polylang/)
 * [Active Topics](https://wordpress.org/support/plugin/polylang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/polylang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/polylang/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Česlav Przywara](https://wordpress.org/support/users/chesio/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/hide-the-current-language-switcher-without-using-widget/#post-10107458)
 * Status: not resolved