Support
Support » Plugin: All in One SEO – Best WordPress SEO Plugin – Easily Improve SEO Rankings & Increase Traffic » how to inser category title in description ?
(@mikhak)
9 years, 8 months ago
Hi.
how to inser category title in description ?
https://wordpress.org/plugins/all-in-one-seo-pack/
(@pbaylies)
Hi mikhak,
You can add things to the description by using the aioseop_description filter. Example:
add_filter( 'aioseop_description', 'mikhak_aioseop_description' ); function mikhak_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; }
thank you.