instead of echoing your styles anywhere, you can hook your code at wp_head to add it in head or wp_footer to add it in your footer, see if it works for you,
function my_custom_style(){
global $post;
if ( !empty ( $post->post_name ) && $post->post_name == 'events' ){ ?>
<style type="text/css">
#main { background-image: none; }
</style>
}
}
add_action ( 'wp_head', 'my_custom_style' );
or
add_action ( 'wp_footer', 'my_custom_style' );
I just saw your page, if you can modify your style then add this to it:
.events-gridview.events-archive #main {
background: none;
}
if you can’t then use the
function my_custom_style(){ ?>
<style type="text/css">
.events-gridview.events-archive #main {
background: none;
}
</style> <?php
}
}
add_action ( 'wp_head', 'my_custom_style' );
It would work without conflict.