Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 -
- 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 -

Supporter timezone: Asia/Dhaka (GMT+06:00)

This topic contains 3 replies, has 2 voices.

Last updated by Prosenjit Barman 9 months, 1 week ago.

Assisted by: Prosenjit Barman.

Author Posts
September 5, 2024 at 8:39 am

isisC-2

Background of the issue:
We have a developed website using WordPress editor, Astra Pro site builder, and Toolset. I have translated the modules and pages and set up the strings translations as well. I followed the instructions from this link: https://wpml.org/forums/topic/astra-pro-customs-layout/.

Symptoms:
I still cannot preview the translated hook. When I switch to Greek, it redirects me to English.

Questions:
How can I preview the translated hook without being redirected to English?
What is the proper way to set it up and what is the specific setting in WPML that I need to adjust to make the translated hooks work correctly?

September 5, 2024 at 9:45 am
September 6, 2024 at 7:09 am #16147379

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
I hope you're doing well.

I reviewed the entire conversation with my colleague and have a clear understanding of the issue.

If you're using Astra Hooks, there’s a different approach to ensure the hook works correctly in other languages. Instead of translating the hook, you’ll need to manually create a separate hook for each language, rather than connecting it as a translation of the default hook.

Hooks function differently compared to templates like headers or footers, which is why manually creating the hook in each language and setting the appropriate conditions is recommended. I've outlined this approach and the reasoning in a similar ticket. Please check the link below for more details.

- https://wpml.org/forums/topic/astra-pro-customs-layout/#post-15213270

To solve the issue, I’ve disconnected the Greek hook from the English hook and applied the same conditions to the Greek hook as in the English version. The content is now displaying correctly on the Greek page. Please see the screenshot here: hidden link

Please follow the instructions mentioned in the ticket above for displaying hooks in other languages. I hope this will be helpful.

Feel free to let me know if you need further assistance or clarification with any particular step. I will be happy to help.

Best regards,
Prosenjit

September 6, 2024 at 7:39 am #16147549

isisC-2

Hello Prosenjit,

I followed the instructions and I have made one new hook with the About the clinic page in Greek but it seems the toolset is not connecting the scripts correctly and the view is not correct. Can you check what I am doing worng?

September 9, 2024 at 3:47 am #16153386

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
I hope you're doing well. Sorry for the delay in responding due to the weekend.

If you’ve added Toolset scripts in the Hook template, you’ll need to manually add the same scripts to the Hook created for other languages. Additionally, the display condition for the other language Hook must be set to ensure it appears correctly in another language.

I reviewed the About page, and the content is displaying correctly in the Greek language. You can see it in this screenshot: hidden link.

It seems the issue with the Hook on the About page has been resolved. However, rather than creating an additional Hook template, you have the option to Duplicate the Hook to other languages and disconnect the translated hook from the default Hook, which is also an effective method. Here are the steps:

- Navigate to the Astra's Hook post type by adding the following parameter in the URL bar after 'wp-admin/': `edit.php?post_type=astra-advanced-hook`.
- Open the Hook in the Editor.
- Translate the Hook by Duplicating it. Check this guide to understand the process.
- Disconnect the translated Hook from the default one by following this guide: https://wpml.org/faq/how-to-disconnect-translations-from-the-default-language-page-or-post/
- Once the Translated Hook is disconnected, reconfigure the display condition for it, and then update the changes.

I hope you can understand. Feel free to let me know if you need further clarification or assistance. I will be happy to help.

Best regards,
Prosenjit

The topic ‘[Closed] wpml set astra advanced hook pages with toolset on different languages’ is closed to new replies.