Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kolaps

    (@kolapsnet)

    Rewrite.php file (custom-post-type-permalinks/CPTP/Module/Rewrite.php)
    line 99
    add_rewrite_tag( ‘%’ . $post_type . ‘_slug%’, ‘(‘ . $args->rewrite[‘slug’] . ‘)’, ‘post_type=’ . $post_type . ‘&slug=’ );

    add line before
    $args->rewrite[‘slug’] = apply_filters( ‘wpml_get_translated_slug’,$args->rewrite[‘slug’],$post_type,$language_code );

    ——
    https://pastebin.com/CtusrEke
    —–

    Permalink.php file (custom-post-type-permalinks/CPTP/Module/Permalink.php)
    line 79
    $permalink = str_replace( ‘%’ . $post_type . ‘_slug%’, $pt_object->rewrite[‘slug’], $permalink );

    add line before
    $pt_object->rewrite[‘slug’] = apply_filters( ‘wpml_get_translated_slug’,$pt_object->rewrite[‘slug’],$post_type,$language_code );

    ——
    https://pastebin.com/SsSbWfTV
    —–

    Thread Starter kolaps

    (@kolapsnet)

    still not working.. when I save permalinks (Settings/Permalinks) its working only on active language… but on translation not… any help ???

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WPML translation CPT slug not working’ is closed to new replies.