My problem is the following: I have text formatting shortcodes aimed at displaying the content in columns. Here is how it works:
[one-half]Here is the content of the first column[/one-half]
[one-half-last]And there is the content of the second column[/one-half-last]
When using the_excerpt() function, shortcodes are automatically stripped (if no excerpts was found, ie. WordPress generates an automatic excerpts) and therefore, any content INSIDE the shortcodes is deleted. As my whole content is inside shortcodes for formatting purposes, that means is excerpt is basically an empty string.
Is there an other function that strips only the ‘[shortcodes]’ and ‘[/shortcodes]’ tags, keeping the content between these two?
Thanks in advance for your answer.
- The topic ‘Stripping shortcodes, keeping the content’ is closed to new replies.