Custom google search - Remove styling

Hey there,

I installed the custom google search plugin and it works fine. But it replaced the style of my search form. The theme i'm using is colormag:
http://demo.themegrill.com/colormag/

Click on the search button in the menu of the demo. Is there any way I can disable the style of the plugin entirely and keep my original CSS?

Thank-you

  • Adam Czajczyk

    Hey Thierry,

    I hope you're well today and thank you for your question!

    Adding following code to your current theme's function.php file should remove all the styles included with Custom Google Search plugin:

    function my_remove_gs_style() {
    	wp_dequeue_style( 'CGSStyle' );
    	wp_deregister_style( 'CGSStyle' );
    	wp_dequeue_style( 'CGSStyle_popup_theme' );
    	wp_deregister_style( 'CGSStyle_popup_theme' );
    	wp_dequeue_style( 'CGSHideButton' );
    	wp_deregister_style( 'CGSHideButton' );
    
    }
    
    add_action('wp_enqueue_scripts', 'my_remove_gs_style', 20);

    There's a good chance though that after removing these bundled-in styles the form will need some custom styling but this depends on the theme, I think.

    Give it a try please and let me know how it worked!

    Cheers,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.