X
32055

Ticket #32055 Public

Dynamic styles do not overwrite default styles

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 );

BY: doobopjazz - Mar 23,2017 AT 6:49PM - 5 years ago
    • By: infotainerdave Mar 23,2017 AT 6:53PM - Posted 5 years ago - #32056

      I’ll let Ashan know this- thank you

      what theme are you using?

    • By: doobopjazz Mar 23,2017 AT 6:53PM - Posted 5 years ago - #32057

      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.

    • By: doobopjazz Mar 23,2017 AT 6:54PM - Posted 5 years ago - #32060

      This is not theme specific, but for testing purposes this occurs if using _s (underscores – http://underscores.me/ ) or default twentyseventeen theme.

    • By: Ashan Perera Mar 24,2017 AT 11:14AM - Posted 5 years ago - #32125

      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’…

You must login to reply to this ticket

HelpDesk

Welcome to EventON helpdesk.

EventON is the #1 Best selling event calendar plugin for WordPress websites in envato marketplace.

Checkout EventON