最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugins - Shortcode show error while editing post

programmeradmin6浏览0评论

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)

  1. 暂无评论