WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
shortcode displaying in G+ Publicize of Jetpack (3 posts)

  1. Anthony Acosta
    Member
    Posted 3 months ago #

    First let me say this plugin is great. Second, I'm experiencing a small issue when syndicating stories to google plus. My Video shortcode is showing up in the description as seen here: http://imgur.com/MSUzjA4

    My question is, how can I remove this from showing up in the syndicated posts on G+.

    In related information, I added this to my functions.php to eliminate the shortcode from showing up in my feeds. Can you help me figure out a solution for this part of Jetpack?

    /* #####################  REMOVE EMBED VIDEO SHORTCODE FROM RSS FEEDS ####################  */
    function removeKGVIDRSS($content) {
    global $post;
    if (shortcode_exists ( 'KGVID' ) ){
    $content = remove_shortcode( 'KGVID', $content) ;
    }
    return preg_replace( '/\[[^\]]+.+]/', '' , $content, -1);
    }
    
    add_filter('the_excerpt_rss', 'removeKGVIDRSS');
    add_filter('the_content_feed', 'removeKGVIDRSS');

    Thank you for your assistance

    https://wordpress.org/plugins/jetpack/

  2. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 3 months ago #

    Hi,

    This is a known issue; any shortcode that isn't part of Jetpack or isn't native to WordPress doesn't get stripped out. This is something that we are working on fixing for a future release.

  3. Anthony Acosta
    Member
    Posted 3 months ago #

    Sweet! I can't wait. I've been banging my head against my keyboard trying to create a function to fix this. Thank you for the response.

Reply

You must log in to post.

About this Plugin

About this Topic