Shortcode show error while editing post

Question

I have created a shortcode to show plugin template through Post When I am Add and view Post its Work well but when I am returning to edit post the page of the editor was not showing there only and a blank page appears.

This is my Shortcode

function show_template($attr)
{
    $args = shortcode_atts( array(

        'temp' => ''

    ), $attr );

    ob_start();
    $temp_id=$args['temp'];
    include('lib/show-template.php');
    return ob_get_clean();
}

add_action( 'init', 'testing_shortcode' );
 
function testing_shortcode()
{
    add_shortcode( 'thewisher', 'show_template' );
}
0
, prashant kushwah 1 year 2020-07-15T15:10:32-05:00 0 Answers 53 views 0

Leave an answer

Browse
Browse