• I’ve used this excellent plugin and another plugin has been added to the site which is casuing a problem, this plugin uses a shortcode in the RTE of [profile].
    When I create my PDF the shortcode renders in the PDF and produces a load of unwanted stuff I can’t seem to remove it.
    I tried making a minor adjustment to the code:

    I replaced this:
    add_filter( ‘the_content’, ‘wrapper_a2p_CreatePdf’, 9999 );

    with this:
    function remove_shortcode_from_pdf($content) {
    $stripped_content = strip_shortcodes($content);
    return $stripped_content;
    }
    $pdf_content = add_filter(‘the_content’, ‘remove_shortcode_from_pdf’);
    add_filter( $pdf_content, ‘wrapper_a2p_CreatePdf’, 9999 );

    I can’t get rid of this shortcode, any ideas would be greatly appreciate!!

  • The topic ‘Can't remove shortcode’ is closed to new replies.