There is a way to delete a specific shortcode, maintaining the text inside?
For example: in this case [dropcap]A[/dropcap] I would like to eliminate the shortcode maintaining the “A”, or any other letter inside.
Thanks!
There is a way to delete a specific shortcode, maintaining the text inside?
For example: in this case [dropcap]A[/dropcap] I would like to eliminate the shortcode maintaining the “A”, or any other letter inside.
Thanks!
You must be logged in to post a comment.
Use this JS regex to strip out any characters between square brackets from the text, while leaving any text that might’ve come beween shortcode tags, like
[dropcap]A[/dropcap]
.or to remove a shortcode like:
You can use the following to your functions.php file:
Here’s a plugin that will launch one time and parse ALL POSTS’ content, stripping the shortcodes (and leaving the content) of any desired shortcodes. Simply enter the shortcodes you want to strip in the $shortcode_tags array and the post type you want to perform on in the $posts array.
NOTE: This will impact your database and can NOT be undone. It is highly recommended that you backup your database first.