How to optimize Contact Form 7?
Contact Form 7 is the most popular and comprehensive free form builder plugin for WordPress.
This will help WordPress create a contact form and insert the form into any page you want.
The optimal is that only when users access pages/posts that use the contact form, the website loads the resources related to it. As for pages without contact form, it will not load js, css.
It helps in optimizing the web for website speed and SEO.
Let’s start with optimization:
I will share with you how to hide the JS or CSS of this plugin when the form does not exist in any page or post.
You just need to paste the above code into the file theme functions.php
The above code will check if it is not there contact form shortcode 7 then it will be automatically unregister css and js Help to optimize website loading speed effectively.
With just the simple code above, you have somewhat optimized your wordpress website, helping users to have a better experience.
If you find it interesting, you can follow the wordpress tips section to learn more new knowledge.
Follow the fanpage to receive the latest articles: Hocwordpress Group
I wish you to have interesting and interesting knowledge about wordpress!