Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6929765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:21:34+00:00 2026-05-27T11:21:34+00:00

I have written 2 wordpress plugins and both use jquery 1.6. I load the

  • 0

I have written 2 wordpress plugins and both use jquery 1.6. I load the plugin using the following code.

Plugin 1

function sheader() {
$plugin_dir = WP_PLUGIN_URL . "/";
?>
       <script type="text/javascript" src="<?php echo $plugin_dir; ?>isearch/js/jquery-1-6.js" ></script>
<?php
}

add_action('wp_head', 'sheader');

Plugin 2

function nheader() {
$plugin_dir = WP_PLUGIN_URL . "/";
?>
       <script type="text/javascript" src="<?php echo $plugin_dir; ?>isearch/js/jquery-1-6.js" ></script>
<?php
}

add_action('wp_head', 'nheader');

Since i am using the same file in both plugins, plgin 1 does not work. when i deactivate plugin 2 it works properly.

How can i solve this issue ??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T11:21:35+00:00Added an answer on May 27, 2026 at 11:21 am

    The way you include jquery, it includes the possibility to load it twice! Since most other plugins use the enque api. Make sure to use wp_enqueueto include any jquery dependency. It will check if it is allready loaded.

    <?php class arevico_facebook{
    function __construct(){
        add_action('wp_enqueue_scripts', array(&$this,'append_javascript'));
    }
    
    function append_javascript(){
         wp_enqueue_script("jquery");
     }}
    ?>
    

    Code is taken from my plugin:
    http://wordpress.org/extend/plugins/facebook-page-promoter-lightbox/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a plugin for Wordpress which generates a jQuery.accordion list of content
I have written the following code. I know that a higher order function is
I have written a function for a multilevel wordpress menu, but I'd like it
Have written the following code: m_selectCategoryTableWidget = new QTableWidget; m_selectCategoryTableWidget->setRowCount(0); m_selectCategoryTableWidget->setColumnCount(2); m_selectCategoryTableWidget->setHorizontalHeaderLabels(QStringList()<<tr(Category)<<tr(Number of items));
I have just written and tested my first non-hobby WordPress plugin, under Xampp on
I have written some code in my VB.NET application to send an HTML e-mail
I have written a site in Prototype but want to switch to jQuery. Any
I have written something that uses the following includes: #include <math.h> #include <time.h> #include
I have written a simple jQuery script that changes the hash tag of a
I have some JQuery written which is intended so when a user navigates to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.