Strip Shortcode Tags and NOT the content

I use a lot of shortcodes on my sites when the user has a lot of requirements for me in design. One issue you have is when the content is displayed in a slider or any other specific area while strip_tags is being used, it looks pretty weird. Something like the following

So the solution is preg_match.


Leave a Reply

Your email address will not be published. Required fields are marked *