plugins - Shortcode show error while editing post

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

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' );
}

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742259577a4410652.html

相关推荐

  • plugins - Shortcode show error while editing post

    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

    1天前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信