WPML and Permalinks
-
Hi,
i have a problem with permalinks from Job Manager in combination with WPML…
I configured everything so it works with two languages (German/English). I’ve set up a code snippet in functions.php to route the two main pages with the job listing snippet (German job page is …/ueber-uns/karriere and the english job page at …/about-us/career:
function change_job_listing_slug( $args ) { if (ICL_LANGUAGE_CODE == "de") { $args['rewrite']['slug'] = _x( 'ueber-uns/karriere', 'Job permalink - resave permalinks after changing this', 'job_manager' ); } if (ICL_LANGUAGE_CODE == "en") { $args['rewrite']['slug'] = _x( 'about-us/career', 'Job permalink - resave permalinks after changing this', 'job_manager' ); } return $args; } add_filter( 'register_post_type_job_listing', 'change_job_listing_slug' );
I’ve additionally configured two slugs in WPML (WPML -> Settings -> Post type translation -> Jobs (job_listing) -> Set different slugs in different languages ??for jobs. The same as above (EN: about-us/career and DE: ueber-uns/karriere).
Now to the problem:
If i create a new job and publish it, the link to the new Job Offer is not working. I get a 404 error. When i refresh permalinks in Settings > permalinks it’s working!?!?
Am i doing something wrong? Or is it a bug with WP Jobs Manager and WPML?
Thank you,
best regards!
- The topic ‘WPML and Permalinks’ is closed to new replies.