Using the Syntax Highlighter Compress plugin, it adds a good ~10KB worth stylesheets (not considering the JS) to all post pages. How do I load the stylesheets and the scripts only on the pages that I actually use the plugin?
Using the Syntax Highlighter Compress plugin, it adds a good ~10KB worth stylesheets (not considering the JS) to all post pages. How do I load the stylesheets and the scripts only on the pages that I actually use the plugin?
You could ad a tag to pages that includes code to be highlighted, and do a <?php if_has_tag('highlight'); ?> to load the CSS/JS files.
It doesn't use the wp_script_enqueue or the wp_script_dequeue methods!
I'm just gonna use your suggested method for the SyntaxHighlighter Evolved plugin! Thanks :-)
This topic has been closed to new replies.