• Resolved beatcore

    (@beatcore)


    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!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support bindlegirl (a11n)

    (@bindlegirl)

    Hi @beatcore !

    WPML doesn’t support the custom permalink structure that WPJM uses so I’m not sure this problem can be easily solved. As far as I understand, the way WPML works is, in this part incompatible, with WPJM.

    When you check the permalink WPML creates for the translated job, you will notice it is saved with the original slug instead of the translated one so that’s why you get the 404 error.

    Plugin Support Jay

    (@bluejay77)

    Hi there,

    It has been more than one week since we have heard from you, so I’m marking this topic as resolved.

    But if you have any further questions or need some more help, you’re welcome to reply here or open another thread.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WPML and Permalinks’ is closed to new replies.