Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #316000

    Hi there,

    I´ve got just a little question and I know it´s not a theme-thing, but maybe … :)

    I´m using the WT3C Cache and everything is working fine.
    The only thing I don´t like is the code at the bottom of each side:

    <!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/
    Minified using disk
    Page Caching using disk: enhanced (User is logged in)
    Object Caching 4003/4518 objects using disk
     -->

    I´ve disabled that with the following comment in the function.php of my Enfold Child:
    add_filter( 'w3tc_can_print_comment', function( $w3tc_setting ) { return false; }, 10, 1 );

    That´s working with two languages, when I´ve got the second language in a different folder (e.g. /en).
    But when I change that to an own domain (WPML), I´ve got the error:
    Parse error: syntax error, unexpected T_FUNCTION in /wp-content/themes/enfold-child/functions.php on line 32

    When I comment out the line, everything is fine but I´ve got the W3TC-Code …

    Have you got an idea? If not, no problem! I know with the theme is everything fine!!!
    Thank you & best regards!
    Ela

    #316016

    Hi bts-de!

    I’m not sure what causes this issue. You can try to use the “shortcode” version of your code:

    
    add_filter( 'w3tc_can_print_comment', '__return_false', 10, 1);
    

    Regards,
    Peter

    #316339

    You´re my hero Peter! That works! :)
    Thank you very much!!!!

    Regards,
    Ela

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘WT3C Code at the bottom – function.php’ is closed to new replies.