-
Üyelik
29.12.2013
-
Yaş/Cinsiyet
40 / E
-
Meslek
Web Yazılım
-
Konum
Macaristan
-
Ad Soyad
B** Ö**
-
Mesajlar
447
-
Beğeniler
65 / 136
-
Ticaret
16, (%100)
Seo için hangi eklentiyi kullanıyorsunuz? All in seo, yoast ve rank math içinde bu özellik var. Hic birini kullanmıyorsanız functions.php içine aşağıdaki kodu ekleyin.
function fix_slash( $string, $type )
{
global $wp_rewrite;
if ( $wp_rewrite->use_trailing_slashes == false )
{
if ( $type != 'single' && $type != 'category' )
return trailingslashit( $string );
if ( $type == 'single' && ( strpos( $string, '.html/' ) !== false ) )
return trailingslashit( $string );
if ( $type == 'category' && ( strpos( $string, 'category' ) !== false ) )
{
$aa_g = str_replace( "/category/", "/", $string );
return trailingslashit( $aa_g );
}
if ( $type == 'category' )
return trailingslashit( $string );
}
return $string;
}
add_filter( 'user_trailingslashit', 'fix_slash', 55, 2 );
Share Improve this answer Follow