Questo utente non ha argomenti preferiti.
Argomenti preferiti del forum
Argomenti del forum creati
| Stato |
Argomento
|
Supporter | Voci | Post | Freschezza |
|---|---|---|---|---|---|
|
Language name parameter missing in some links
1
2
Iniziato da: samoS
in: 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 giorno, 7 ora fa |