Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2021-03-19 11:49:27
- nobi-wan
- Member
- Registered: 2021-02-05
- Posts: 23
Automatically class first paragraph of body text?
I tried to automatically class the first body paragraph with rss_auto_excerpt, but the plugin doesn’t appear to be working properly — or I’m not righting it write. It’s not applying the class or skipping paragraphs — though it is losing the link.
<txp:rss_auto_excerpt paragraphs="1" excerptwraptag="intro" showlinkwithexcerpt="0"/>
<txp:rss_auto_excerpt skipparagraphs="1" paragraphs="99" />
Sure, yes, I know I could use excerpts or something, but I want to use those for something else, and this must be doable “automatically”. Tell me it’s true :)
Ta!
Offline
Offline
#3 2021-03-19 12:31:24
- nobi-wan
- Member
- Registered: 2021-02-05
- Posts: 23
Offline
Re: Automatically class first paragraph of body text?
Actually, even core should be able to do it now:
<txp:body trim="/^<p/" replace="<p class='my-class'" />
Offline