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?
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.
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.
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?
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.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.