- This topic has 5 replies, 2 voices, and was last updated 5 years, 7 months ago by Tom.
-
AuthorPosts
-
September 18, 2018 at 1:30 pm #680565anothernguyen
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?
September 18, 2018 at 10:42 pm #680802TomLead DeveloperLead DeveloperHi 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?
September 19, 2018 at 4:32 am #680978anothernguyenThere 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.
September 19, 2018 at 8:40 am #681297TomLead DeveloperLead DeveloperWhen you open the element in the Dashboard, you’ll see the ID in the URL.
September 19, 2018 at 3:26 pm #681602anothernguyenThank 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!
September 19, 2018 at 9:59 pm #681790TomLead DeveloperLead DeveloperAwesome! Thanks for sharing the process!
Really appreciate the kind words! Glad you’re enjoying it ๐
-
AuthorPosts
- You must be logged in to reply to this topic.