Support » Plugins » Polylang with Graphin theme: mirror front page uses normal page theme

  • Hi, I installed the latest version of polylang with wordpress 3.3.1. When switching the front page from hebrew to english, the theme of the mirror page does not uses the front page theme but rather a normal theme.

    Here is the front page that was selected in Settings –> Reading (Hebrew page):

    Press the English language on the switcher on the right sidebar and you will get to its mirror page:
    The theme is not of a top page (the top slider, for example, is missing).

    Any help would be appreciated.

Viewing 8 replies - 1 through 8 (of 8 total)
  • I believe that your theme is somewhere calling the function is_front_page() which, unfortunately, has no filter. If you find this code, just replace it by pll_is_front_page().

    I see that you succeeded to setup a bidirectionnal site. I suppose that you had to made some tweaks. For your information, v0.7 will fully support rtl languages without any tweaks needed.

    Worked very well, thank you.
    I changed it on the file functions.php .

    Yes, I had to made 2 changes to adjust for bidirectional:
    1. Put in comment the line that define the default language to Hebrew at wp-config.php.
    2. Inside the header.php, set an if condition: if it the language is herbrew, load the rtl css files and set the html-element dir attribute to rtl.

    Do you have any estimation when v0.7 will be ready?
    Because I still have small issues and I’m not sure why. Do you know if I can somehow change also the dir attribute in the first code line of a page when switching a language, not only the lang attribute?
    (as mentioned before, right now I changed it using an if condition and I’m not sure if I do it too late or not)

    Regardless, I tested few other plugins before this one and this plugin is just great. Thank you.

    A development version will probably be available tomorrow. I will post an announcement on the forum. The final version should be released the first week of February.

    That’s great, thank you very much for all your work.

    Hi again.

    I upgraded to version 0.7 and there seems to be a new problem:

    The line:
    define (‘WPLANG’, ‘he_IL’);
    does not affect the website.
    Before the upgrade, if this line was active, the dir attribute of the html tag was right to left (rtl) and the rtl css files of our theme (Graphine) were loaded.
    After the upgrade, if this line is active, the dir attribute of the html tag is left to right (ltr) and the rtl css files of our theme are not loaded.

    Right now, it is as if our website does not support Right to Left languages, except for the lang attribute of the page which correct according to the language.

    This is the website:

    The reason it is right to left right now is due to if-else blocks I wrote in the header.php file in order to load the rtl.css files and to change the dir attribute of the page.

    Do you have any solution?
    Thank you very much.

    It’s a desired feature to overwrite the define (‘WPLANG’, ‘he_IL’);
    Now rtl.css should be loaded based on user choice.

    On admin side, you should choose Hebrew as admin language in Users -> Your profile. On frontend side, the rtl.css should be loaded when the visitor is browsing the Hebrew language. No more need for if / else trick.

    Ooops ! I forgot the most important. As 0.6.1 and older did not support the RTL languages, you must go on the languages page and edit the Hebrew language to specify it is RTL.

    Okay, great, now everything is fine!

    One thing that does not bother us, but you may want to check is that the mirror front page (the English one) still takes settings of a normal page, not the Hebrew front page. Unless I am missing something…

    Thank you very much for your great work.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Polylang with Graphin theme: mirror front page uses normal page theme’ is closed to new replies.