JustMeSander
Forum Replies Created
-
Forum: Plugins
In reply to: [Polylang] non unique slugs, and an other questionOk 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
In reply to: [Polylang] non unique slugs, and an other questionWell 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 =PBUT: I noticed that when i go to
https://www.example.com/es/contact/
that my browser redirects me to
https://www.example.com/nl/contact/(the contact page for ES is “contact-2”)
So i’m going to look into it today =)
Forum: Plugins
In reply to: [Polylang] non unique slugs, and an other questionThanks 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
In reply to: [Polylang] non unique slugs, and an other questionYou 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
In reply to: [Polylang] non unique slugs, and an other questionGot a solution for the redirect with static pages,
https://www.example.com redirects now to https://www.example.com/en/ instead https://www.example.com/en/homeIn 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
In reply to: [Polylang] non unique slugs, and an other questionFirst 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 https://www.example.com/ i get nicely redirected to
https://www.example.com/en/home but https://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 https://www.example.com to https://www.example.com/en/
I solved it for now by adjusting the index.php, but that is just a quick fix.
Forum: Plugins
In reply to: [Polylang] Language switcher doesn't appear in menuI 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
In reply to: [User Access Manager] Hide "public" page for logged in usersI 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.