WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
Strip Shortcodes from New Post Email (4 posts)

  1. pmcgilvray
    Member
    Posted 2 years ago #

    I am using a theme-specific shortcode '[custom_frame_center]' to display post images within a frame. When a user gets a new post email notification via JetPack Blog Subscriptions, the shortcode tags are displayed on either side of the image in the email. How do I get rid of these?

    http://wordpress.org/extend/plugins/jetpack/

  2. kentzo
    Member
    Posted 2 years ago #

    I am trying to strip the shortcode as well, i found this function strip_shortcodes which can strip off the shortcode. However it will strip off the content enclosed by the shortcode.

    For example,
    "[myshortcode var1="1"]blah blah blah[/myshortcode] na na na"

    after parsing the above text with strip_shortcodes($text),

    The output will be:
    "na na na"

    What i want is just to strip off the tag itself rather than stripping the tags together with the content enclosed within the tag.

    Anyone know of any ready function to do that? I am lazy to code it myself.

  3. laura@cliniclink.org
    Member
    Posted 2 years ago #

    kentzo -

    I am really, really new to all of this. Where did you put the function to strip the shortcodes?

  4. lin2ai4
    Member
    Posted 1 year ago #

    Same problem. The shortcode in my case is Pretty File Links. The shortcode appears in the e-mail from Jetpack, like this:

    [prettyfilelink src="http://www.forummagistrorum.com/wpb/wp-content/uploads/2012/12/Olympian-symbol-cards.pdf" type="pdf"]Olympian symbol cards pdf[/prettyfilelink]

    I don't expect Pretty Links in the e-mail, but regular links instead of the shortcode would be good.

    Is there any chance of a general Jetpack fix? Or are the different types of shortcodes too numerous?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic