WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Brian
    Member
    Posted 4 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?

    http://wordpress.org/extend/plugins/syntaxhighlighter/

  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():

    <?php
    if ( is_home() ) {
    	global $SyntaxHighlighter;
    	$SyntaxHighlighter->usedbrushes = array();
    }
    ?>
  3. Brian
    Member
    Posted 4 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic