[Resolved] Display Rule conflict for front page using Polylang

Home Forums Support [Resolved] Display Rule conflict for front page using Polylang

Home Forums Support Display Rule conflict for front page using Polylang

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #680565
    anothernguyen

    I’m running into a similar issue as the person from this thread: https://generatepress.com/forums/topic/bug-elements-and-display-rules-and-wpml-wpml-global-locations-bug-ongoing/ (see bullet point #1)

    My site is in Portuguese (main language) and English (second language) and the home page has a slider (Smart Slider). I’m using the Polylang plugin to switch between languages. All of the other pages switch flawlessly between Portuguese and English except for the home page. There’s a display rule conflict for the “Front page” so the Portuguese version always displays whether I choose Portuguese or English. I tried the solution given in the above mentioned thread but it didn’t work. Do you have a workaround for those using Polylang instead of WPML?

    GeneratePress 2.1.4
    GP Premium 1.7.2
    #680802
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    That’s strange. So if you do it for a regular static page, there are no issues?

    I wonder if it would be worth asking Polylang if they have any ideas?

    #680978
    anothernguyen

    There are no issues with regular static pages. It’s just the front page due to the display rule. The main front page is in Portuguese so the English version of the front page takes on the Portuguese version due to the display rule conflict.

    I’ll check with Polylang to see if they have any ideas.

    By the way, how does one find the element ID for an element? I’m revisiting the solution you offered for the person using WPML and the filter you provided had element ids.

    #681297
    Tom
    Lead Developer
    Lead Developer

    When you open the element in the Dashboard, you’ll see the ID in the URL.

    #681602
    anothernguyen

    Thank you for the pointer. ๐Ÿ™‚ After trying out different hooks and checking Polylang’s support, I finally resolved the issue without using any hooks or messing with Polylang. In case anyone else has this issue, here’s how I did it:

    Note – I’m using the Elementor plugin to create layouts.

    1. I created two home pages – a Portuguese version and an English version. I added my Smart Slider to the layout at the top to create the hero slider. The Portuguese version has the Portuguese slider. The English version has the English slider.

    2. I created two different header elements in GP – Portuguese Home and English Home. Both elements have <!– Hero Slider –> in the content box. Under Site Header, I selected Merge for Merge with Content since I wanted the logo to appear over the hero sliders. Under Display Rules, I selected Front Page.

    Voila! :)) Both languages now display their respective sliders. Essentially, I moved the sliders to the layout section of each page to avoid conflicting header display rules for the front page.

    Thank you for your support. I’ve created a few sites now with GeneratePress (theme and premium plugin) and it truly is the best combo I’ve tried. I started with WordPress years ago and left quietly for Squarespace. GeneratePress has brought me back “home.” I’ve even recreated a few Squarespace sites with GeneratePress to see what’s possible and I’m impressed. Thank you for your dedication to GP!

    #681790
    Tom
    Lead Developer
    Lead Developer

    Awesome! Thanks for sharing the process!

    Really appreciate the kind words! Glad you’re enjoying it ๐Ÿ™‚

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