-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No luck with translations working for slugs #31
Comments
I just used this plugin to to translate a CPT slug in a project, and everything worked great. Not sure if I understood your problem, but have you tried to access the 'Permalink' page in Admin to update the permalink structure? Maybe this does the trick for you. |
I'm having the same problem when I set the URL modifications option in Polylang to
If I set it to:
The plugin works as advertized. If I'm not mistaken the function that deals with this is wp-polylang-translate-rewrite-slugs/polylang-translate-rewrite-slugs.php Lines 236 to 244 in 4f06404
If you have it set otherwise, it should skip this check and still create a proper URL. However it doesn't seem to be the case. Here's my code: add_filter('pll_translated_post_type_rewrite_slugs', function($post_type_translated_slugs) {
$post_type_translated_slugs = array(
'product' => array(
'fr' => array(
'has_archive' => true,
'rewrite' => array(
'slug' => 'produit',
),
),
'en' => array(
'has_archive' => true,
'rewrite' => array(
'slug' => 'product',
)
)
)
);
return $post_type_translated_slugs;
}); WP 4.4 I tried to troubleshoot, but I couldn't see anything wrong with the plugin. |
I've posted a possible solution for this in #32 ;) |
It turned out to be because of having rewrites in both my custom post setup AND in the file above. Best to only have it once? Might also be the order I was loading php files. Need to check. |
Hey this seems like a great plugin... buuuuuuut I can't seem to get it to work at all?
I have followed the instructions (it might be time to update them? Can't find any info about implementing translations for custom archive slugs...) but I seem to be missing something. As soon as I set everything up, the re-writing of the URLs works perfectly, but all the urls give me a 404, even english (which I have set up in the filter hook) which is the same url is failing.
I know this isn't a support forum or anything but hoping someone can give me a nudge in the right direction?
WP 4.3.1
Polylang 1.7.11
WP Polylang translate rewrite slugs 0.3.6
Thanks in advance for any advice
The text was updated successfully, but these errors were encountered: