דלג על ניווט

Open

Topic Tags: Compatibility

Overview of the issue

If you are using WP Job Manager plugin, you may encounter 404 errors when attempting to access job listings in translated languages.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open the …/wp-content/plugins/wp-job-manager/includes/class-wp-job-manager-post-types.php file
  • Look for line 278.
  • Replace:
    $permalink_structure = self::get_permalink_structure();
    
  • With:
    $permalink_structure = self::get_permalink_structure();
    
    // WPML Workaround for compsupp-7570
    if( class_exists( 'Sitepress' ) ) {
    	$permalink_structure["job_rewrite_slug"] = 'job';
    }
    

2 תגובות אל “WP Job Manager Job - Incorrect Slug Translation for Job Listings”

  1. Hi,
    I'm also having issues with using the [jobs] shortcode where if its in a translated page it will send a post request to /jm-ajax/get_listings/?lang=es/ with the trailing slash so it returns a 404. Is there a similar workaround that i can try?

השאר מענה

אנא הישארו בנושא והיו מכבדים לאחרים. אם אתה צריך עזרה בבעיות שאינן קשורות לפוסט הזה, השתמש בפורום התמיכה שלנו כדי להתחיל צ'אט או לשלוח כרטיס.

תוכל להשתמש בתגים הבאים:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>