Load styles for specific category only
-
Thanks for the plugin!
I’m trying to use the conditional you guys recommended on the FAQ, but instead of a page, I’m loading the listing on a category page.
This is what I tried:
add_action( 'init', 'your_override_wrapper_function', 99 ); function your_override_wrapper_function() { if ( ! is_category( '20' ) ) { // ID is numeric, slug is a string. return; // we don't want to run for anything except the page we're interested in. } a_z_listing_force_enable_styles(); // this is the page we want, so run the function to enqueue the styles. }Doesn’t work. However, the other function, without the conditional, works fine.
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
The topic ‘Load styles for specific category only’ is closed to new replies.