ผู้ใช้นี้ไม่มีหัวข้อที่ชื่นชอบ.
หัวข้อฟอรัมที่ชื่นชอบ
หัวข้อฟอรัมที่สร้าง
| สถานะ |
หัวข้อ
|
ผู้สนับสนุน | เสียง | โพสต์ | ความใหม่ |
|---|---|---|---|---|---|
|
Language name parameter missing in some links
1
2
เริ่มโดย: samoS
ใน: English Support
Problem: Option 1: No changes to Yoast Premium (recommended) add_filter( 'Yoast\\WP\\SEO\\term_redirect_slug_change', function( $create_redirect ) {
// Only act in admin term edit contexts.
if ( ! is_admin() ) {
return $create_redirect;
}
$taxonomy = $_POST['taxonomy'] ?? '';
if ( ! $taxonomy || ! taxonomy_exists( $taxonomy ) ) {
return $create_redirect; // not editing a taxonomy term
}
if ( class_exists('Sitepress') ) {
$current_lang = apply_filters( 'wpml_current_language', null );
$default_lang = apply_filters( 'wpml_default_language', null );
if ( $current_lang !== $default_lang ) {
return true; // prevent Yoast redirect creation
}
}
return $create_redirect;
}, 10 );This prevents Yoast from automatically creating redirects for taxonomy terms in secondary languages. Option 2: Modify Yoast Premium code We plan to notify Yoast about this behavior. However, if this solution does not apply to your case or seems outdated, we highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket. |
|
0 | 17 | 6 days, 13 hours มาแล้ว |