That’s because %category_title% is not supported in the Description Format field. Our developers may be able to provide you with some code to support this for post descriptions.
Thread Starter
gwenm
(@gwenm)
yes, I will π
Thank you very much
Hi gwenm,
Here’s some code for this, add it to a plugin or to the functions.php in your theme:
add_filter( 'aioseop_description', 'gwenm_aioseop_description' );
function gwenm_aioseop_description( $description ) {
if ( is_single() ) {
$categories = get_the_category();
$category = '';
if ( count( $categories ) > 0 ) {
$category = $categories[0]->cat_name;
}
if ( !empty( $category ) ) $description .= " {$category}";
}
return $category;
}
Thread Starter
gwenm
(@gwenm)
ok, it works ! Thank you very much, your support it’s very nice π