Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Meta Description for an individual article
what’s the best way to have a nice little meta description for an article?
using this line:
<meta name=“description” content=”<txp:body />” />
or using rss_auto_excerpt for that matter, seems to mess things up if there’s a weird character in the sentence.
Offline
#2 2009-02-11 20:16:11
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Meta Description for an individual article
mrtunes wrote:
if there’s a weird character in the sentence
What exactly do you mean by ‘weird character’? You can use etz_striptags to strip html tags from the body (or excerpt), and rss_auto_excerpt has the attributes striptags
and stripbreakstabs
to take care of that.
If you plan to use the article body as meta description, you’d have to be sure that it doesn’t contain too much text though. I’m using rss_auto_excerpt with a limit of 30 words.
Offline
Re: Meta Description for an individual article
i had a websters phonetic spelling, but i think the striptags or stripbreaktabs took care of that. now i just need to kill off the link to “read more”. do you know which attribute that is? thanks as usual
also those strip options weren’t available cause i was using an outdated version of the plugin but now i’m updated to 0.5
Last edited by mrtunes (2009-02-11 21:53:51)
Offline
#4 2009-02-11 23:08:15
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Meta Description for an individual article
All attributes are in the plugin help :) But I think you need showlinkwithexcerpt
, at least that’s what I am using and I don’t get the read more link:
<meta name="description" content="<txp:rss_auto_excerpt words="30" overrideexcerpt="1" striptags="1" showlinkwithexcerpt="0" stripbreakstabs="1" excerptwraptag="" ending="..." />" />
Offline