Making Thematic play nice with w3 Total Cache

Home Forums Plugin Integration Making Thematic play nice with w3 Total Cache

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Scott Nix 5 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #3154


    Hey all,

    A quick one I hope. In W3 Total Cache General Options when I select the tick box of “minify” to be “enabled” my site after being refreshed appears virtuall unformatted, ie, no CSS being applied.

    One theory I have is that it’s the way that I have added some of my files perhaps? So, for example, I haven’t enqueued my script properly, when I add my own custom css file:

    function childtheme_create_stylesheet() {
    	&lt;link href=&quot;<a href=";quot" rel="nofollow">;quot</a>; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
     &lt;!&#8211;?php &lt;br ?&#8211;&gt;}
    add_filter(&#8216;thematic_create_stylesheet&#8217;, &#8216;childtheme_create_stylesheet&#8217;);

    When I right click to view source and locate the css file, I click on this and file is not found. For the above example, how I would I correctly enqueue the script is it as follows:

    function childtheme_scripts(){
     wp_enqueue_script(‘bacon-script’, get_stylesheet_directory_uri . ‘/scripts/bacon.js’, array(‘jquery’), ‘1.0’, true);
     wp_enqueue_script(‘guacmole-script’, get_stylesheet_directory_uri . ‘/scripts/guac.js’, array(‘jquery’));

    With the code directly above my understanding is that using get_stylesheet_directory_uri causes more resources than hard coding the path to the stylesheet – am I right?

    Anyone else have a thought as to why minify is not working when I enable it. Do I have to manually enter into w3 Total Cache the scripts / CSS that I want minify and their location for example?

    If anyone has any ideas why W3 Total Cache isn’t allowing me to minify with my Thematic child theme please let me know. Thanks in advance for any assistance.


    Scott Nix

    Never heard anything about the speed of using get_stylesheet_uri. When it comes to stylesheets and scripts there is just a right way and wrong way. Enqueue is the right way. Seems like this would definetley not allow Total Cache to work, but I am not going to test that.  😛



Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Making Thematic play nice with w3 Total Cache’ is closed to new replies.