-
AuthorPosts
-
February 13, 2014 at 2:13 pm #223413
Hi,
I have a problem with my permalinks on enfold theme.
I have followed instructions on this link: http://kriesi.at/documentation/enfold/translating-the-portfolio-slug-with-wpml/
And also rewrite the permalinks, also I’ve deleted the htaccess and rewrite again, nothing works.Pages return 404 errors, portfolio post type & home still work.
- This topic was modified 10 years, 10 months ago by Josue.
February 13, 2014 at 2:18 pm #223415This reply has been marked as private.February 14, 2014 at 1:58 pm #223968Sorry but I have to “desactivate WPML” to continue working (it works when I don’t active it. To see the problem, please activate it again.
February 15, 2014 at 4:07 pm #224342Hey!
I fixed it with this code:
add_filter('avf_portfolio_cpt_args','avia_deactivate_portfolio_slug_rewrite', 10, 1); function avia_deactivate_portfolio_slug_rewrite($args) { $args['rewrite'] = false; return $args; }
I added it into the functions.php file. You can also add it to a plugin or child theme php file if necessary.
It will deactivate the slug rewrite for portfolio items and then wordpress will process the page permalinks properly. It seems like your server hits a limitation if all post types (pages, portfolio items, posts and other custom post types) register their “pretty” permalink rules and it just stops to process them at a certain point. When I deactivate the pretty permalink for the portfolio post type the “pretty” permalinks at least start to work for the pages.
Best regards,
PeterFebruary 16, 2014 at 8:23 pm #224582Dear Peter,
Thanks for your answer, it’s working yes however I don’t think it’s good for SEO not to have permalinks…
Any other solution? When we use standard WordPress config & WPML, rewrited permalinks are working.
Thanks in advance,
Cyril
February 17, 2014 at 9:01 am #224820Hey!
Yes because the standard worpress config does not use an additional post type (i.e. the portfolio entries) and thus you won’t reach the limit of rewrite rules. As soon as you add some custom post types the number of rewrite rules increases and your server does not process the rewrite rules for all post types anymore. There’s nothing I can do to fix it from our end (with code). The only solution is to deactivate the “pretty permalinks” for the post type our theme registers and I already provided that code. You might want to contact the server administrator/host – maybe they can tweak the server configuration somehow and change this limit (although I’m not sure which settings need to be changed) or you try to move the website to a different server/host.
Cheers!
PeterFebruary 17, 2014 at 4:00 pm #224990Hi Peter,
Thanks for you answer.
Hmmm it’s a dedicated server used for all our websites. We produce websites for our customers with many custom post type and this is the first time that we have the problem. This is also the first time that we use enfold theme. Is it related to the enfold theme?
You don’t have any idea concerning the server config?
Thanks in advance,
Cyril
February 17, 2014 at 6:43 pm #225029Hi!
You can try to update to the lates theme version (2.5.2) – maybe it fixes the issue. We changed some things for better WP3.8 compatibility and tmaybe the changes will also fix the rewrite rule issue on your server. I’m only aware of one other user who reported a similar issue with permalinks and there it was definitely no theme issue because other post types (i.e. the “products” post type of WooCommerce) also didn’t work even if the default theme “TwentyThirteen” was activated.
Best regards,
PeterFebruary 19, 2014 at 5:25 pm #226294Hello Peter,
Is there a way to know which version I’m currently using? (in admin or files?)
February 19, 2014 at 5:38 pm #226313Peter I can confirm that changing the server didn’t solve the problem.
February 20, 2014 at 7:43 am #226628Hey!
You’re using 2.5. The latest version is 2.5.2.
Regards,
PeterFebruary 21, 2014 at 8:00 pm #227642hi
I am also facing the permalink / 404 error. Now you suggest to put the code in config.php. But which one?
BBpress, gravity forms,layerslider,templatebuilder wordpress seo, WPMLAnd were can i Put that code? top – bottom??
February 22, 2014 at 11:42 am #227861Hi!
I recommend to add it to enfold/functions.php – insert it at the very bottom:
add_filter('avf_portfolio_cpt_args','avia_deactivate_portfolio_slug_rewrite', 10, 1); function avia_deactivate_portfolio_slug_rewrite($args) { $args['rewrite'] = false; return $args; }
but before you try this code follow the instructions here: http://kriesi.at/documentation/enfold/translating-the-portfolio-slug-with-wpml/ and make sure that the slugs are translated properly.
Regards,
PeterFebruary 24, 2014 at 2:00 am #228278Now I have to buy plugins? At least, according to me link which bring me to WPML site?
February 24, 2014 at 8:55 am #228373Hi!
No, you just need to buy the Multilingual CMS version. It comes with the String Translation extension for free. For a complete overview see: http://wpml.org/purchase/
Regards,
PeterFebruary 24, 2014 at 8:44 pm #228662Hi,
Sorry I got busy, I can confirm that migrating to the last theme version corrected the permalinks problem for me.
Thanks for you help Peter! see u in an other topic :D
Cyril
-
AuthorPosts
- The topic ‘Permalink error with WPML (404)’ is closed to new replies.