WordPress.org

Ready to get started?Download WordPress

Forums

Problems with WP 2.6 loading jquery (2 posts)

  1. designerwood
    Member
    Posted 5 years ago #

    Hello,

    Wondering why my jquery path is being screwed up when loaded by default.

    If I leave code as is in NextGen Gallery then it loads as follows ... placing the page name (images) infront of the wp-include. Which is the wrong path.

    <script type='text/javascript' src='http://domainname.com/images//wp-includes/js/jquery/jquery.js?ver=1.2.6'></script>

    However, if I remove the condition in nggallery.php and force it to deregister the script and reload it, then it loads correctly.

    <script type='text/javascript' src='/wp-content/plugins/nggallery/admin/js/jquery.js?ver=1.2.6'></script>

    '//if ($wp_version < "2.5") {
    //if ($wp_version > "2.1.3") wp_deregister_script('jquery');
    //wp_enqueue_script('jquery', NGGALLERY_URLPATH .'admin/js/jquery.js', FALSE, '1.2.2');
    //}
    if ($wp_version > "2.1.3") wp_deregister_script('jquery');
    wp_enqueue_script('jquery', NGGALLERY_URLPATH .'admin/js/jquery.js', FALSE, '1.2.6');'

  2. designerwood
    Member
    Posted 5 years ago #

    I'm new to this so hopefully making sense ;)

    The default loading of the script is just wp_enqueue_script( 'jquery' ); That does not seem to setup the src properly if you have additional page structure. It doesn't use the root domain like it should to locate the script it puts in the full path infront of the script location which makes it invalid (pointing to the wrong location).

    Is this something I have setup wrong in my config/settings?

Topic Closed

This topic has been closed to new replies.

About this Topic