Title: JustMeSander's Replies | WordPress.org

---

# JustMeSander

  [  ](https://wordpress.org/support/users/justmesander/)

 *   [Profile](https://wordpress.org/support/users/justmesander/)
 *   [Topics Started](https://wordpress.org/support/users/justmesander/topics/)
 *   [Replies Created](https://wordpress.org/support/users/justmesander/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/justmesander/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/justmesander/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/justmesander/engagements/)
 *   [Favorites](https://wordpress.org/support/users/justmesander/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] non unique slugs, and an other question](https://wordpress.org/support/topic/non-unique-slugs-and-an-other-question/)
 *  Thread Starter [JustMeSander](https://wordpress.org/support/users/justmesander/)
 * (@justmesander)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/non-unique-slugs-and-an-other-question/#post-3370695)
 * Ok that was a dead end.
 * What the problem is, is that wp loads the page from the slug.
    And polylang extracts
   the language from the permalinks (or something else) and compares that to the
   post language. Otherwise the page is redirected to the right language. But on
   that point it’s to late to alter the main WPQuery that loads the page.
 * I need to find the right action/filter to alter the incoming request (main WP
   Query). if you remove the redirect and navigate to /es/contact you get the contact
   page but not in the right language.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] non unique slugs, and an other question](https://wordpress.org/support/topic/non-unique-slugs-and-an-other-question/)
 *  Thread Starter [JustMeSander](https://wordpress.org/support/users/justmesander/)
 * (@justmesander)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/non-unique-slugs-and-an-other-question/#post-3370693)
 * Well I don’t know Chouby, and I guess he’s busy too.
    And I really don’t know
   the code, so I have to go through it anyway =P
 * BUT: I noticed that when i go to
    [http://www.example.com/es/contact/](http://www.example.com/es/contact/)
   that my browser redirects me to [http://www.example.com/nl/contact/](http://www.example.com/nl/contact/)
 * (the contact page for ES is “contact-2”)
 * So i’m going to look into it today =)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] non unique slugs, and an other question](https://wordpress.org/support/topic/non-unique-slugs-and-an-other-question/)
 *  Thread Starter [JustMeSander](https://wordpress.org/support/users/justmesander/)
 * (@justmesander)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/non-unique-slugs-and-an-other-question/#post-3370674)
 * Thanks for the notice =)
 * I didn’t have much time to look into the code for a solution, but i really need
   it so i need to make time for it soon, hopefully I/we can find a solution that’s
   good enhoug instead of a hack.
 * My first idea was to create a slug (actually post_name) with a prefix, but i 
   just don’t like the idea of that and i think it will create other problems in
   wordpress (and it’s just ugly).
 * Also i need to walkthroug the code of polylang so i can come up with a solution.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] non unique slugs, and an other question](https://wordpress.org/support/topic/non-unique-slugs-and-an-other-question/)
 *  Thread Starter [JustMeSander](https://wordpress.org/support/users/justmesander/)
 * (@justmesander)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/non-unique-slugs-and-an-other-question/#post-3370652)
 * You are right, don’t know how i could miss that.
 * I’m making a little progress with the slugs, I will post it here when it’s done.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] non unique slugs, and an other question](https://wordpress.org/support/topic/non-unique-slugs-and-an-other-question/)
 *  Thread Starter [JustMeSander](https://wordpress.org/support/users/justmesander/)
 * (@justmesander)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/non-unique-slugs-and-an-other-question/#post-3370600)
 * Got a solution for the redirect with static pages,
    [http://www.example.com](http://www.example.com)
   redirects now to [http://www.example.com/en/](http://www.example.com/en/) instead
   [http://www.example.com/en/home](http://www.example.com/en/home)
 * In core.php
 * On line 386
    is_string($redirect = $this->get_home_url($this->curlang)) Changed
   to is_string($redirect = $this->get_home_url($this->curlang, false, true))
 * On line 854
    get_home_url($language = ”, $is_search = false) Changed it to: get_home_url(
   $language = ”, $is_search = false, $is_frontpage = false)
 * And on line 867
    (!$is_search …. Changed it to: (where $is_frontpage means it
   is the frontpage of the frontend) (!$is_frontpage && !$is_search ….
 * Still getting an empty page, but solved that in the index.php
    (still looking
   for a nice solution)
 * get_header();
    echo apply_filters(‘the_content’, get_page(pll_get_post(71))->
   post_content) get_footer();
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] non unique slugs, and an other question](https://wordpress.org/support/topic/non-unique-slugs-and-an-other-question/)
 *  Thread Starter [JustMeSander](https://wordpress.org/support/users/justmesander/)
 * (@justmesander)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/non-unique-slugs-and-an-other-question/#post-3370585)
 * First of all thanks =)
 * What are the advantages of pll__? or is it just a preference.
    Because the default
   translation system works pretty good. Only disadvantage in my opinion is all 
   the stuff that comes with plugins to translate the .mo files (Wich is pretty 
   good done in polylang no non needed additional stuff etc).
 * I’m gave that script a try from the other topic, but it’s not working in WP 3.5(
   I will fix it and post it here)
 * I also have one other problem.
    When i hit [http://www.example.com/](http://www.example.com/)
   i get nicely redirected to [http://www.example.com/en/home](http://www.example.com/en/home)
   but [http://www.example.com/en/](http://www.example.com/en/) doesn’t seem to 
   work and i get a blank page while i expect the home page without redirect.
 * Or a redirect from [http://www.example.com](http://www.example.com) to [http://www.example.com/en/](http://www.example.com/en/)
 * I solved it for now by adjusting the index.php, but that is just a quick fix.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] Language switcher doesn't appear in menu](https://wordpress.org/support/topic/language-switcher-doesnt-appear-in-menu-1/)
 *  [JustMeSander](https://wordpress.org/support/users/justmesander/)
 * (@justmesander)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/language-switcher-doesnt-appear-in-menu-1/#post-3371124)
 * I experienced a problem, when you don’t have items in the menu , the language
   switch isn’t displayed.
 * I added to those menu’s an menu item and i hide with with css for now.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[User Access Manager] Hide "public" page for logged in users](https://wordpress.org/support/topic/hide-public-page-for-logged-in-users/)
 *  [JustMeSander](https://wordpress.org/support/users/justmesander/)
 * (@justmesander)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/hide-public-page-for-logged-in-users/#post-3342468)
 * I agree, and i really need it so i’m going to try to develop it for myself.
    
   Maybe someone can give a little bit of advice or feedback to get me kick started(
   and ofcourse i can share what i have made).
 * My thoughts:
    When you check the “Protect this page and its descendants” you 
   should be able to select a group “Non registered users” besides the registered
   users.

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