- This topic has 20 replies, 2 voices, and was last updated 4 years, 10 months ago by Tom.
-
AuthorPosts
-
May 3, 2018 at 12:32 am #566210sg
Hi guys, i intend to do this.
combine all the css into one file and delete the ref for other css.
where can i do this ? snippets ? child theme ?there is 10+ css loaded in the front end . i choose all option except woocommerce for my GP Premium,
i am aware of the autooptimize, and cache plugins, im using both .any help appreciated.
May 3, 2018 at 10:14 am #566642TomLead DeveloperLead DeveloperAutoptimize should do exactly that for you. We have recommended settings in this article: https://generatepress.com/fastest-wordpress-theme/
Is that not working for you?
May 3, 2018 at 9:51 pm #566979sgHI tom, i intend to use less plugin and manually minify and reduce number of css files ref if possible. able to achieve so many till now. its amazing how when you take things on your hand try to take control . cheers
May 4, 2018 at 9:12 am #567477TomLead DeveloperLead DeveloperManually minifying the GP files would involve creating your own CSS/JS, then dequeuing the ones added by the theme.
May 4, 2018 at 2:41 pm #567754sgyes. this is what i am looking for. could you guide along pls.
May 4, 2018 at 8:38 pm #567908TomLead DeveloperLead DeveloperWhich files have you manually combined?
If you let me know which files, I can write the code to disable GP from loading those files.
A big issue with doing this is you won’t receive code updates to those files, which could cause errors in future updates.
For example, if I change code in navigation-search.min.js and you’re using the old code, it could break your site javascript.
That’s why solutions like Autoptimize are awesome – they update it for you.
March 30, 2019 at 12:01 am #853990sgHi tom. sorry missed this.
i have manually combine style.min.css ,mobile.min.css ,
March 30, 2019 at 9:02 am #854401TomLead DeveloperLead DeveloperWhile it’s possible to remove the style.min.css file, it will likely break your website, as tons of the dynamic CSS depends on that file existing.
If you want to do it anyways, you can do this:
add_action( 'wp_enqueue_scripts', function() { wp_deregister_script( 'generate-style' ); }, 50 );
The benefits of combining those two files definitely don’t outweigh the negatives of doing this.
April 7, 2019 at 6:10 am #861911sgHi tom.
i have some workaround for all this.
i have simple CSS and js pro in my site.what I could do is dequeue all GP scripts and CSS and put it as inline CSS in the plugins.
will that help to improve optimizations?
my site is very complicated and cant use those minifying plugins. still trying ..Thanks
April 7, 2019 at 9:26 am #862144TomLead DeveloperLead DeveloperIt will likely make very little difference. GP itself has a very small footprint when it comes to page size.
You’re not able to use something like Autoptimize?: https://generatepress.com/fastest-wordpress-theme/
April 7, 2019 at 9:28 am #862145sgYes , i cant . many conflicts.
small sizes yes. but the request are still more then 10 ?
April 7, 2019 at 4:17 pm #862341TomLead DeveloperLead DeveloperGP shouldn’t have that many requests? Are you going to optimize all of your plugins like this as well? I can’t help but think it would be easier to figure out why plugins like Autoptimize are conflicting, instead of trying to deconstruct themes/plugins.
What kind of conflicts are you running into?
April 7, 2019 at 4:25 pm #862352sgi am on toolset, autoptimize is a no-no there 🙁
so, i cant touch toolset, i was thinking to improve on other plugins and themes that have many request on css and js. is there any way to merge generate press css and style only manually ? will the inclusion rules works?
i am now dropping autoptimize as it doesnt have finer control.
April 7, 2019 at 4:25 pm #862353sgusing swift performance plugins now.
April 7, 2019 at 4:43 pm #862366TomLead DeveloperLead DeveloperI believe Swift should combine and minimize your files. Is it working for you?
-
AuthorPosts
- You must be logged in to reply to this topic.