[Plugin: SyntaxHighlighter Evolved] Script Loads When Not Needed (3 posts)

  1. Brian
    Posted 6 years ago #

    The plugin's scripts usually load only when its needed, however, the script seems to be loading on my site's home page (http://techairlines.com), even though since I'm using experts, no shortcode gets executed on the front page. In addition, even on the excerpts, there's nothing that requires the Syntax Highlighter code.

    Is there a way to disable SyntaxHighlighter Evolved scripts to load on the index page?


  2. The shortcode is being executed, it's just not being shown and there's no way for my plugin to know that you're using excerpts instead of full content.

    Try adding this to your footer.php file, before wp_footer():

    if ( is_home() ) {
    	global $SyntaxHighlighter;
    	$SyntaxHighlighter->usedbrushes = array();
  3. Brian
    Posted 6 years ago #

    It works perfectly. Thanks for the quick reply! :)

Topic Closed

This topic has been closed to new replies.

About this Topic