Contact Form 7 eklentisini kullananlar, bu eklentiye ait style dosyasının, yani css dosyasının yüklemesini iptal etmek için yapılacak ufak bir adım function.php dosyasına aşağıdaki kodu eklemektir. Böylelikle kendi style.css dosyamızı kullanarak formları istediğimiz şekilde biçimlendirebiliriz.
// remove contact-form-7 css add_action('wp_print_styles', 'removeCss'); function removeCss() { if ( !is_page('contact-us')) { //replace the slug if needed wp_deregister_style('contact-form-7'); } }
Ek olarak ihtiyaç duyarsak Contact form 7 ile gelen JS yüklemelerini de iptal edebiliriz:
// remove contact-form-7 js add_action('wp_print_scripts', 'removeJs'); function removeJs() { if ( !is_page('contact-us')) { //replace the slug if needed wp_deregister_script('contact-form-7'); } }