Support » Plugins and Hacks » [Resolved] Adding your own JS without breaking WP Plugin JS Scripts

[Resolved] Adding your own JS without breaking WP Plugin JS Scripts

  • Hey guys I’m having trouble with loading my js scripts properly. Reading the codex I’m a bit confused as to how to properly load them in my header. With out them my menu does not work nor image swaps. Some of the effects and rely on the google library for JQuery, but the rest are in a folder stored in my themes folder.

    How do you call them properly to load in the header without removing the wp_head() which is what the widgets and plugins rely on.

    My scripts work perfect but only when I remove the wp_head() info. But then I know that sets me up for less compatible widget control and the beauty of WordPress.

    Here is what I deleted for my scripts to work.

    /* We add some JavaScript to pages with the comment form
    * to support sites with threaded comments (when in use).
    /*if ( is_singular() && get_option( 'thread_comments' ) )
    wp_enqueue_script( 'comment-reply' );*/
    /* Always have wp_head() just before the closing </head>
    * tag of your theme, or you will break many plugins, which
    * generally use this hook to add elements to <head> such
    * as styles, scripts, and meta tags.
    /* wp_head(); */

    Here is scripts I loaded in the head. I know that some might interfere. I know that there is a certain way to load them but am confused as to how to do that properly.

    <!--[if lte IE 6]>
    	<script type="text/javascript" src="http://new.saa.edu/wp-content/themes/saa/js/supersleight/supersleight-min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
    <script type="text/javascript" src="http://new.saa.edu/wp-content/themes/saa/js/swapimage/jquery-1.2.6.min.js"></script>
    <script type="text/javascript" src="http://new.saa.edu/wp-content/themes/saa/js/swapimage/jquery.metadata.min.js"></script>
    <script type="text/javascript" src="http://new.saa.edu/wp-content/themes/saa/js/swapimage/jquery.swapimage.min.js"></script>
    <script type="text/javascript" src="http://new.saa.edu/wp-content/themes/saa/js/jquery.hoverIntent.minified.js"></script>
    <script type="text/javascript" src="http://new.saa.edu/wp-content/themes/saa/js/swfobject.js"></script>

    Thank You in advance, the lessons are much appreciated!
    Jonny B’

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Adding your own JS without breaking WP Plugin JS Scripts’ is closed to new replies.
Skip to toolbar