Tagged: x
-
AuthorPosts
-
August 2, 2016 at 4:02 am #1113433
macknumParticipantHi,
I found some entries but no solution right now. I am using WPML on a dual language site. I would like to translate the portfolio slug using WPML. Is this possible right now?
August 2, 2016 at 4:11 am #1113445
ThaiModeratorHi There,
Please add the following code under functions.php file locates in your child theme:
add_filter('option_x_custom_portfolio_slug','translate_portfolio_slug'); function translate_portfolio_slug( $content ) { return __( $content, '__x__' ); }After that navigate to WPML String Translation then scan all the texts again.
Hope it helps π
August 2, 2016 at 4:20 am #1113454
macknumParticipantthx, this basically works, I now have the issue that the permalink of the portfolio item did not change. the generated link is “/produkte/” which is the german original I entered in the x-theme configuration. This is translated when browsing to “/products/”, which is correct, the english version of the item still shows “/produkte/product-item/”, and I cannot change this manually with the item since this only allows me to chante “product-item” and not “/produkte/produkt-item/”
August 2, 2016 at 4:22 am #1113460
ThaiModeratorHi There,
In this case, would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
β Link login to your site
β WordPress Admin username / PasswordDonβt forget to select Set as a private reply. This ensures your information is only visible to our staff.
Thanks.
August 2, 2016 at 4:27 am #1113465
macknumParticipantThis reply has been marked as private.August 2, 2016 at 4:32 am #1113469
ThaiModeratorHi There,
Can you set that account to the Administrator?
Thanks.
August 2, 2016 at 4:32 am #1113473
macknumParticipantdone
August 2, 2016 at 7:09 am #1113643
macknumParticipantdid admin work?
August 2, 2016 at 8:34 am #1113755
macknumParticipantfyi: I set the string translation to the original “produkte” so the site is working currently. after you have checked it I would like to set it to “products” again
August 3, 2016 at 1:36 pm #1115855
RadModeratorHi there,
It can’t be done without direct coding. Slugs are identifications of a page and changing it while running will detach them to the page it identifies which will result to 404.
There are two possible ways, but we can’t provide deeper customization.
1. Please check this https://wpml.org/documentation/getting-started-guide/translating-page-slugs/ and the file responsible for post type registration is this wp-content\themes\x\framework\functions\global\admin\custom-post-types.php
2. Or using .htaccess rewrite to redirect the request to translated slug then internally forward it to its respective WPML query variables. This is tricky and hard, I would contact WPML as they are more familiar with it.
Thanks!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1113433 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
