Presentation page and multilingual sites (through Polylang plugin)

  • Author
    Posts
  • #16576
    Namae

    Hi,

    Tempera is a really great theme. I particularly love the presentation page, however the text, slider and central columns don’t work well with multilingual websites.

    I am using Polylang plugin for this. It would be nice to add compatibility in a future update but in the meantime, how should I go about implementing this myself ? I know PHP well but the inner workings of WordPress, less so, that’s why I’m asking 🙂

    Thanks for the great theme !

    #16671
    Namae

    Let me elaborate. Easy one first: there is no option to set language for the “extras” text.
    Secondly, both the slider and the columns only show the current language posts if they are set to display “latest posts”. That’s the correct behaviour I’m looking for, unfortunately it doesn’t work with other display options. I am particularly interested in:

    – Custom slides and slides made from specific posts (or of a given category or tag, as a workaround, such as “slides”)
    – Widget columns and columns made from specific posts (or of a given category or tag, such as “columns”)

    Unfortunately it isn’t possible without some changes. Would you hint me on the way to implementing them as well as a multilanguage ready “Extra” text ? I could give back the code to you afterwards, if building this myself is not too time consuming.

    In case you wish to know more let’s describe one of the issues, the one where Tempera’s columns and sliders are set to display “specific posts”: Tempera then just displays whatever posts we ask it to regardless of language and alternate hreflang.

    Ideally, let’s say post 7 is in English and post 8 is the French version of that same article. If for some reason I wanted both post 7 and post 8 to display, I would add both of their IDs to the “specific posts” field, which is the current behaviour. But if I want only post 7 or 8 to display based on language, I would add only ONE ID, for example 7. Then, possibly thanks to Polylang and using maybe icl_get_languages(), Tempera would figure out that post 8 is the post to display when the user is French, instead of post 7. (because post 7 and 8 are alternate versions of each other and WordPress knows this)

    Finally the following is a probably unrelated issue, but selecting “sticky posts” has no effect on neither the columns nor the slider. It seems to work just like “latest posts” and disregard the sticky status.

    Sorry this may be adding a lot on your plate, but as I said if you hint me to what I need to change and stuff, I can get back to you with code =)

    #16709
    Namae

    Actually I was able to workaround the issue somewhat for specific posts. Remain custom slides, widget columns and most importantly the “extras” text of the presentation page.

    The workaround involves using “Latest post from category”, then add and remove posts from a slider category for slides and front-columns category for the columns. That effectively makes these posts “specific”, which is a fine workaround.

    I thought this didn’t work but it does so long as there is the “slider” category exists in all available languages.

    I would much prefer it being a tag than a category though.

    Other than that I can get started as soon as the “extras” issue is solved, even though I’d really like custom slides and widget columns instead of featuring real posts, but oh well.

    This theme really is great 🙂

    #21798
    Radek

    I found solution with Custom Content Shortcode.

    I have page homepage (CZ) and its translation welcome-to-our-website (EN)

    In Extra text -> Top Title I put this code:
    [loop type=”page” name=”homepage”][content field=”title”][/loop]
    and
    In Extra text -> Top Title I put this code:
    [loop type=”page” name=”homepage”][content][/loop]

    I also tried it without the loop section, because my homepage is the “homepage” page.
    So I tried this code without the loop, because it should show the current page:
    [content type=”page” field=”title”]
    But this is WRONG, because it displays last post (no page).

    #29013
    Mecky

    Hi,

    I am working on the multilingual part of my website. I use Polylang. But this gave me the following error: warning:illegal string offset “local”in/home/../plugins/polylang/include/language.php.

    I use the cryout widget on my homepage.

    Can you help me fixe this problem, so I can use polylang.

    thnx a million

    #30930
    Vasilis

    I use Polylang but there is no option to translate the extra text in first page of Tempera Theme. Any idea?

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Presentation page and multilingual sites (through Polylang plugin)’ is closed to new replies.