WordPress.org

Forums

[Plugin: W3 Total Cache] How to exlude a specific Template Page? (7 posts)

  1. webserviceXXL
    Member
    Posted 5 years ago #

    Hi, have two sites using a complete own template.
    W3 Total Cache automatically adds the default css "w3tc/min/default.include.css" in the HEAD-Section.

    How can i avoid that?

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. gerald@WPcustoms
    Member
    Posted 5 years ago #

    Hi,

    you need to deregister the css file in the function.php file in your theme folder.
    just add this:

    function my_deregister_styles() {
    	wp_deregister_style( 'w3tc' );
    }

    I don't know the meta name of the css file but you just need to insert it between the '' (where I got w3tc)

    you can then add the css infos in your style.css file if required.

  3. gerald@WPcustoms
    Member
    Posted 5 years ago #

    sorry I forgot there's a line in front:

    add_action( 'wp_print_styles', 'my_deregister_styles', 100 );
    function my_deregister_styles() {
    	wp_deregister_style( 'w3tc' );
    }
  4. webserviceXXL
    Member
    Posted 5 years ago #

    Thanks for your help but i think my phrasing was unfortunate.

    i mean that i have a single php file on my site which is completely independent from all other pages in this template. so usually it's ok that w3tc automatically insert the minified version of the css file. But not for this single php file.

    i already tried to insert your code directly in this file. Unfortunately without success.

  5. Frederick Townes
    Member
    Posted 5 years ago #

    What is the path to this file?

  6. webserviceXXL
    Member
    Posted 5 years ago #

    1. (ROOT)/filexyz.php
    2. (ROOT)/wp-content/plugins/oiopub-direct/purchase.php

  7. Frederick Townes
    Member
    Posted 5 years ago #

    Currently this functinoality is not supported. Normally template files live in the theme directory and in such case you are able therefore not use the default group and instead use respective minify groups to resolve an issue like this.

Topic Closed

This topic has been closed to new replies.

About this Topic