Okay
  Public Ticket #195924
CSS in head
Closed

Comments

  • Jack started the conversation

    How can I remove CSS from the head and put it in an external file? 

  •  8,839
    Tahir replied

    Hey Jack!

    The search engines will consider it an external file as we are using the WP standard method to output it. As regards your question , its not possible for dynamic css files. 

    Cheers


    ThemeNectar Support Team 

  • Jack replied

    Thanks for the response Tahir. 

    Interesting that search engines do that... I thought they just pick up on what they find in the head. 

    I read an article by a guy who had a technique for stripping out the dynamic CSS from the head of Canvas by Woo: http://www.woothemes.com/2013/04/case-study-stavan...

    Just thought there may be a similar method for Salient. 

  •  8,839
    Tahir replied

    Thanks for the reference, I have notified the author about this and will be responding shortly if he has a fix :) .

    Cheer 


    ThemeNectar Support Team 

  • Jack replied

    Hi Tahir, did the author have any suggestions? 

    Cheers,

    Jack

  •  8,839
    Tahir replied

    Hi Jack!

    He will respond to this ticket as i have flagged it. I just had a brief look at the article you provided the link for . Could you please explain what technique they are using that you want implemented in salient ?. 

    Thanks


    ThemeNectar Support Team 

  • Jack replied

    Hi Tahir, sorry for the delay. 

    If you look at the github file here"https://github.com/mjepson/sgk/blob/master/functio...

    you can see that they have removed the custom styles from the head by editing the functions.php file. 

    // Remove custom styles remove_action( 'wp_head', 'woo_enqueue_custom_styling' );

    I just want to know if I can do something like this with the Salient theme? 

    --

    Another problem I'm having is I want to edit the css in the responsive.css file. I have duplicated it and put it in the child theme folder, in a folder called css then edited it but the change is not taking effect. 

  •  8,839
    Tahir replied

    Hey Jack!

    The technique you  are referring to will remove external files from the head not remove the inline styles added dynamically via the builtin function of wp.  I believe you have misunderstood the technique. 

    Thanks


    ThemeNectar Support Team 

  • Jack replied

    Hello. I've used the the technique before and successfully removed the inline CSS from the head in Canvas. That's all I'm trying to do with Salient. Ah well. Never mind. Thanks for your time. 

  • Jack replied

    Hello, 

    I found a fix to this which may help anyone looking for a solution to the same issue. 

    This plugin seems to work very well on first inspection: http://wordpress.org/plugins/autoptimize/

    Jack

  •  8,839
    Tahir replied

    Hey Jack!

    Have used this plugin and is recommended by us as well. 

    Cheers


    ThemeNectar Support Team 

  • Jack replied

    Splendid. Thanks Tahir, good to know. 

    I used it with WP Super Cache, that's pretty good too.  

    Cheers,