Support » Plugin: Cachify » Right way to add Stylesheet

  • Hello Cachify Team, hello Sergej Müller.

    cachify/inc/cachify.class.php -> line -> 708
    
    Replace with:
    
    function add_to_head(){
         echo  '<style>#wp-admin-bar-cachify{display:list-item !important} .ab-icon{margin:0 !important} .ab-icon:before{content:"\f182";top:2px;margin:0}</style>';
    }
    add_action('wp_head','add_to_head');

    The W3C Validator loves it. 🙂

    Great Plugin!

    https://wordpress.org/plugins/cachify/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Bernhard Kau

    (@kau-boy)

    Could you please provide some information about the issue, the W3 validator is having with the CSS code? This line was recently changed to fix some overwriting issues.

    The <style> Tag should add to the <head> not to the Body, at the bottom of the Sourcecode.

    The Plugin addeds it at the wp_footer() not to the wp_head().

    The W3C Validator shows me:

    line 175 column 7 – Error: Element “style” not allowed as child of element “div” in this context. (Suppressing further errors from this subtree.)

    For Frontend and Backend:

    function add_to_head(){
         echo  '<style>#wp-admin-bar-cachify{display:list-item !important} .ab-icon{margin:0 !important} .ab-icon:before{content:"\f182";top:2px;margin:0}</style>';
    }
    add_action('wp_head','add_to_head');
    add_action( 'admin_enqueue_scripts', 'add_to_head');
    Plugin Author Bernhard Kau

    (@kau-boy)

    That’s correct. I thought you were refering to the changed CSS rules. OK, we put that on our list (or if you’d like to, you can open an issue or pull request yourself: https://github.com/pluginkollektiv/cachify).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Right way to add Stylesheet’ is closed to new replies.