Jump to content

meta-description truncate


guest*

Recommended Posts

Meta descriptions are not truncated before output (which can be up-to 255 chars). Locate header.tpl in your theme and change

{if isset($meta_description) AND $meta_description}
<meta name="description" content="{$meta_description|escape:html:'UTF-8'}" />
{/if}

 

to add a truncate modifier

 

{if isset($meta_description) AND $meta_description}
<meta name="description" content="{$meta_description|truncate:160|escape:html:'UTF-8'}" />
{/if}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...