• Hi there, love the plugin, it works great. In my case, too great. Here is my situation….

    My site has a number of shortcodes embedded in the body that I don’t want to appear on Apple News. I’ve got a rough idea of the syntax I need, something like this…

    add_filter( 'apple_news_exporter_content_pre', 'disable_myshortcode' );
    function disable_myshortcode($content, $postID) {
    	remove_shortcode('myshortcode');
    }

    But that’s not working. Is that the right filter? Is there a different way the remove_shortcode should be invoked? Any thoughts?

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter rexsorgatz

    (@rexsorgatz)

    Hi, surfacing this for @kevinfodness, in case you missed it, as it was submitted over the weekend. (Does tagging people in here do anything? I guess we’re about to find out.)

    Thread Starter rexsorgatz

    (@rexsorgatz)

    For anyone else who stumbles across this, this is what eventually worked:

    add_action( 'apple_news_exporter_content_pre', 'disable_myshortcodes');
    function disable_myshortcodes($content) {
    $content = strip_shortcodes($content);
    return $content;
    }

    It removes all shortcodes, not a specific one, but that was fine for my scenario.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Blocking a Shortcode’ is closed to new replies.