[Resolved] puling css from wordpress core file in to child theme

Home Forums Support [Resolved] puling css from wordpress core file in to child theme

Home Forums Support puling css from wordpress core file in to child theme

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1066264
    olusegun

    i am currently trying to optimize my site, while using chrome dev tools to see the css file being loaded. i came across a css file in wordpress core with the url: https://muzzmusic.com/wp-includes/css/dist/block-library
    /style.min.css?ver=5.3 and total size of 41,467 bytes and i only require less than 2% of the file to load my individual post. i have copied out the required code for my post to load but i dont know how to add it to my child theme and instruct wordpress to go and load the reduced version of the code from my child theme instead of loading it from wordpress core

    #1066308
    David
    Staff
    Customer Support

    Hi there,

    this topic here explains how to dequeue the style sheet:

    https://generatepress.com/forums/topic/missing-wp-includes-css-dist-block-library-style-min-css-on-wordpress-4-9-10/#post-998360

    Then its simply a case of including the styles you require in your child theme style sheet.

    #1066377
    olusegun

    Thanks David it worked perfectly.

    Please how do i remove css codes from generatepress and gp premium files (/themes/generatepress/css/unsemantic-grid.min.css?ver=2.3.2, gp-premium/menu-plus/functions/css
    /offside.min.css?ver=1.8.3)
    Taking this two files as an example

    #1066404
    David
    Staff
    Customer Support

    Unsemantic – best thing is to check Combine CSS in Customizer > GeneratePress then it will only load the essential CSS the theme requires.

    I believe offside CSS is a dependency so cannot be removed.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.