• Resolved fantasts

    (@fantasts)


    First of all, this is a great plugin, I like it very much and can’t leave it. Some recent problems have prevented me from using them properly.

    Recently I used cached output for the content of the article, and the plugin no longer works.

    The plugin segment code can output the code normally, but the CSS/JS file cannot be loaded automatically.

    If I click on the preview change in the article editing page, the article in preview mode can load the file normally.

    This made me very confused, I tried to read the code of the plugin loading file part, but still can’t understand why.

    Below is the code for my cached article.

    $group = 'single';
        if(is_user_logged_in()){
            $key = 'login'.get_the_ID();
        } else {
            $key = 'tourist'.get_the_ID();
        }
        if(is_preview()){
            $html = false;
        } else {
            $html = zww_cache_html($key, $group);
        }
        if(! $html){
            ob_start();
    ......Article content......
     $html = ob_get_clean();
        $html .= "<!-- From single_post cache in ". date("Y-m-d H:i:s",time())." -->";
        zww_cache_html($key, $group, $html, 86400);
        }
        echo $html;
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Plugins do not automatically load js/css’ is closed to new replies.