Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Problem with Polylang

  • I am developing a website with gp premium + elements.

    I am translating it using polylang.

    I created navigation buttons that allow the user to navigate between a cpt.

    Everything fine untill I install polylang that is not showing only the navigation buttons. Instead all other elements are working properly.

    Here is how i created the navigation:
    element type: hook
    hook name: before_content
    priority 10

    Whats wrong with it?

    Pd: already tryed to deactivate all other plugins which are very few.

  • Hi there,

    Everything fine untill I install polylang that is not showing only the navigation buttons. Instead all other elements are working properly.

    I’m not sure I understand this sentence, can you explain some more about your issue?

  • Yes sure.

    The thing is that there is an element that I created to have navigation buttons

    Here is how i created the navigation:
    element type: hook
    hook name: before_content
    priority 10

    And that was working perfectly untill I installed polylang.

    As soon as I installed polylang this element just stopped working. As you can see in the link attached, there is no navigation showing anywhere.

  • When you say navigation, do you mean the WP navigation block?

    Can you add some static content to the element as well, like a paragraph, does it show?

  • No I am trying to create it with generateblocks.

    Actually I just noticed that if I add static content to the element it does show.

    Check the notes please.

  • Hi there,

    Could you change the login role to Administrator so we can access the Elements settings?

  • sure, done.

    Thanks!

  • Hi there,

    can you add some static content to the pagination elements so we can check whether its Polylang interfering with the element being loaded, or the function required to output the navigation.

  • Hey!

    Done, as you can see it does appear.

  • Ok, so it means the core functions we use to output the previous and next links are retuning no value. Hence the empty navigation container in the HTML.

    If you disable the element and just allow the regular post navigation ( set in Customiser > Layout > Blog ) to display. Do they work ?

  • It’s a CPT not a blog post, this is why I am using elements.

    However in the blog section, navigation is working. Check the link in private section

  • If you want to try displaying the regular post navigation – this article explains how to:

    https://docs.generatepress.com/article/displaying-post-navigation-for-custom-post-types/

    Let us know

  • No, I really need to show the element I created, it’s a specific request of my client.

  • So the Element is displaying – but the post navigation is empty; which means the WordPress functions GB uses did not return a next / previous link. Which we can assume is because of what Polylang is doing.

    Generally this kind of issue would be resolved by telling Polylang to Ignore Translations on the Element but that I believe is a Polylang Pro feature.

    Simply put – the problem is caused by Polylang breaking the core function we use in the element. And it’s something Polylang would have to address.

  • Ok, solved by myself. I’ll explain to enrich you support forum.

    So the problem was that I did not assign to the cpt their language, this caused polylang not to “understand” which post to assign to dynamic navigation buttons (of course, my bad).

    Once assigned the right language to at least 3 posts it was able to recognize current, previuos and following post.

    All done! Thanks for the amazing support once again!

  • Aah – well that would explain it 🙂 And thank you for taking the time to let us know. I am sure others. will find it useful

Viewing 16 posts - 1 through 16 (of 16 total)
  • You must be logged in to reply to this topic.