• Hi there everybody,

    I have a problem concerning wordpress auto-excerpt feature: everytime I share a post on fb the excerpt shows the shortcode of the plugin I use for Google Adsense, as you can see trying to share this: http://nicolozarotti.com/hotspot-wifi-di-vodafone-per-liphone-4-follia-pura/

    So I was wondering if there is any way to exclude it from the auto-excerpt. I know I could manually set it, but it would mean I’d have to manually edit hundreds of posts. Moreover, this problem has appeared all of a sudden.

    I have already tried these codes in the function.php:

    add_filter( ‘the_excerpt’, ‘shortcode_unautop’);
    add_filter( ‘the_excerpt’, ‘do_shortcode’);

    but they didn’t work and I don’t really know what to do to prevent WP from having this annoying behaviour.

    Thank you very much,

    Nicolò

  • The topic ‘Exclude shortcodes from auto-excerpt feature’ is closed to new replies.