Support » Plugin: Jetpack by WordPress.com » shortcode displaying in G Publicize of Jetpack

  • 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/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Richard Archambault

    (@richardmtl)

    Happiness Engineer

    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.

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘shortcode displaying in G Publicize of Jetpack’ is closed to new replies.