This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Reply To: replacing prettyphoto, other scripts…

Israel Curtis

Thanks for your consideration. (your github link is 404?)

on a related note, I’m having some trouble “dequeueing” the styles associated with these JS components (prettyphoto in particular). I see that they are hooked here:
add_action( 'wp_enqueue_scripts', 'themeblvd_include_styles', 5 );
I noticed a minor gotcha in that the priority here is 5, so previous instructions to hook at 9 to override JS should be updated to take this into account. Of course, that would only be in the case that you wanted to replace an enqueued style with your own, like the JS:
wp_enqueue_style( 'prettyphoto', TB_FRAMEWORK_URI . '/frontend/assets/plugins/prettyphoto/css/prettyPhoto.css', array(), '3.1.3' );
In my case, however, I don’t want to replace – I want to simply remove it from the loading queue. This works fine for scripts in the wp_enqueue_scripts hook (at normal priority, as I’m not trying to preempt the existing script):
But it does not work for
And I have no idea why. When I check the source for the rendered page, the JS for pretty photo is gone, but the CSS is still being called…