Zapping Captions
-
On my index page I have 300 char article summaries followed by ‘read more’, as per standard. However the char display adds the caption (bad enough) and to add insult to injury it outputs it in raw code, like this:
[caption id="attachment_86" align="alignright" width="299" caption="Photo courtesy shopdivine"][/caption] Monique Leshman has been a favorite for ages owing to her boho meets glam designs and carefree aesthetic. I had the honor of meeting her and we had a great conversation. Here’s an excerpt fo
The information is obtained by
echo dp_clean($post->post_content, 300);
I added a semi-fix by changing it to
$rawContent = dp_clean($post->post_content, 300);
$fixedContent = apply_filters(‘the_content’, $rawContent );
echo $fixedContent;but the last [/caption] tag still shows up:
[/caption]Monique Leshman has been a favorite for ages owing to her boho meets glam designs and carefree aesthetic. I had the honor of meeting her and we had a great conversation. Here’s an excerpt fo
…and in some cases the actual caption does too, with space wasting padding around it. I don’t want any caption info on these summaries at all – how do I get rid of all caption info from post_content for the summaries, but still have captions in the main article?
The topic ‘Zapping Captions’ is closed to new replies.