Dynamic styles were being enqueued before other addon styles, for example, which meant they were not overwriting those styles.
For example:
I fixed this by removing and readding the dynamic style enqueue at a higher priority:
function my_enqueue_function() {
// fix stylesheet not overriding in eventon
wp_dequeue_style('eventon_dynamic_styles');
wp_enqueue_style('eventon_dynamic_styles');
}
add_action( 'wp_enqueue_scripts', 'my_enqueue_function', 999 );
I’ll let Ashan know this- thank you
what theme are you using?
After above change, dynamic style is enqueued after other eventon styles, so it overwrites them as intended.
Obviously this should ideally be done in the plugin somewhere, not the theme.
This is not theme specific, but for testing purposes this occurs if using _s (underscores – http://underscores.me/ ) or default twentyseventeen theme.
Thanks for letting me know. This is a very good point you make here.
So we have eventon_enqueue_styles action called before dynamic styles but after main eventon styles are called. What we are going to do is make all addon styles load in that call. So it would be awhile before we can get all addons upto speed.
But if you want to adjust the addons feel free to change the code.
instead of add_action( ‘wp_enqueue_scripts’,… it would be add_action(‘eventon_enqueue_styles’…