• Hey guys,

    I am in the process of setting up a new page template that displays galleys in a single column, floated to the right, with all other content showing on the left. To get it the way I want I have a function that extracts the gallery from the post content, and displays it in it’s own div outside of “entry-content”, and I then wish to strip the gallery tag out of content when it does run as normal. I have achieved everything except stripping the gallery out from the content on the left.

    What I essentially am hoping to locate is a function that does exactly the same thing as strip_shortcodes(), but for a specific shortcode. Something like strip_shortcode(‘gallery’) or strip_shortcode(‘gallery’, content()).

    remove_shortcode(‘gallery’) works bar it leaves the damn text behind when it runs.

    Any ideas?

  • The topic ‘strip_shortcodes() but for a specific shortcode’ is closed to new replies.