Meta Description Tag

The meta description tag is automatically generated from the post/page excerpt or post/page content (in case you don’t enter an excerpt).

Note that WordPress doesn’t support excerpt for pages. Slim SEO fixes this by adding excerpt to pages, so you can enter custom excerpt for pages.

  • For homepage, if you set it as a static page, then the plugin treats it like a normal page.
  • For categories, post tags or custom taxonomies, their description will be used as meta description.

The meta description will be normalized by stripping all the HTML tags, white spaces.

The plugin also parses shortcodes (in case you use shortcodes in the post content or use a page builder plugin to build your page). This is different from other SEO plugins, which don’t parse shortcodes from post content.

The recommended length for the meta description is 50-160 characters. So, if the description is longer than 160 characters, it will be truncated to 160 characters.

How to change meta description manually?

If you want to set custom meta description for a specific post or term, simply enter the text in the Search Engine Optimization meta box below the content area:

Edit meta description manually in Slim SEO
Search Engine Optimization meta box

You’ll see the status icon showing if the description has a good length. Note that, the manual meta description is not truncated. It’s always shown as it is.

As the plugin supports shortcodes, you can simply add your own shortcodes here to output your custom dynamic content.

How to change the meta description?

If you want to change the meta description, please use the slim_seo_meta_description filter.

The following code change the description of a post with ID = 24. The description is set via a custom field:

add_filter( 'slim_seo_meta_description', function ( $description ) {
if ( is_single( 24 ) ) {
$description = get_post_meta( get_the_ID(), 'field_id', true );
return $description;
} );