Remove added body classes when plugin not in use
-
Hey!
I only use JSJ Code Highlight on web dev blog posts, so have no need for the plugin to load any other time…
I use:
wp_deregister_style( 'jsj_code_highlight_client_style' ); wp_deregister_style( 'jsj_code_highlight-monokai_sublime_theme' );
to deregister the sylesheets, as I have added everything I need to my master stylesheet, and have also added:
if ( !(is_single() && in_category( 'web-development' )) ) { wp_dequeue_script( 'jsjCodeHighlight-Highlight' ); }
to my theme’s function.php, so that the JS only loads on the relevant pages.
I was wondering if it’s also possible to remove the extra body classes that get added, when the plugin is not in use. I currently have:
jsj_code_highlight jsj_code_highlight-monokai_sublime jsj_code_highlight-web_fonts jsj_code_highlight-no-include_additional_styles jsj_code_highlight-add_line_numbers jsj_code_highlight-no-tab_replacement
on every page.
Any help greatly appreciated!
Many thanks!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Remove added body classes when plugin not in use’ is closed to new replies.