Jump to content

How to set character limit on META Description?


Recommended Posts

My current theme, an awesome job by Adult-HTML, has the full content in the meta description.

Is there a setting in KVS that limits the meta description to X amount of characters? Or is that something we put in the theme itself?

Any help would be great.

thx

Link to comment
Share on other sites

The meta description is rendered like this in Website UI -> Page components -> include_header_general.tpl:

<meta name="description" content="{{$page_description|mb_ucfirst|default:$lang.html.default_description}}"/>

You can use Smarty truncate modifier to limit its output to specific length:

<meta name="description" content="{{$page_description|mb_ucfirst|default:$lang.html.default_description|truncate:1000:"...":true}}"/>
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...