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 8437857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:33:02+00:00 2026-06-10T07:33:02+00:00

Can I use third party jquery plugins in my wordpress plugin? Can’t find anything

  • 0

Can I use third party jquery plugins in my wordpress plugin? Can’t find anything about this. What would the structure look like? Would I enqueue the script like I’m working in a theme? I’m pretty new to wordpress.

Also does my plugin need a doctype and a head tag and all of that? I’m guessing not?

I’m trying to take a non-wordpress script and turn it into a plugin. Here’s my code, I’m using this 3rd party plugin – http://filamentgroup.com/lab/update_to_jquery_visualize_accessible_charts_with_html5_from_designing_with/

<?php

/*

Plugin Name: Crashboard

Description: a crash test

Version: 0.3

Author: Fuzzy Logic

License: GPL2

*/

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>CrashBoard</title>
<link href="css/basic.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="http://filamentgroup.github.com/EnhanceJS/enhance.js"></script> 
<script type="text/javascript" src='js/visualize.jQuery.js'></script>
<link href='css/visualize.css' type="text/css" rel="stylesheet" />     
<link href='css/visualize-light.css' type="text/css" rel="stylesheet" />    
<style>
#chart{
    display: none;
}

#chart7{
    display: none;
}

#gross{
    display: none;
}

#gross7{
    display: none;
}

#table_2 {
margin-left: 550px;
margin-top: -668px;
margin-bottom: 474px;
}

#sevenchart {
margin-left: 520px;
margin-top: -450px;
}

#sevengross{
margin-left: 260px;
margin-top: -30px;
}

#thirtychart {
margin-top: -38px;
margin-left: 22px;
}

#thirtygross {
margin-top: -38px;
margin-left: 22px;
margin-bottom: 15px;
}

#chart thead, td{
min-width: 60px;
}
</style>            
<script type="text/javascript">            
    $(document).ready(function(){

        $('#table').visualize({type: 'area', width: 950, height: 270}).appendTo('#thirtychart');

    });
</script>
</head>
<body>
<br/>
<table id="table">
<caption>30 Day Sales Overview</caption>
<thead>
    <tr>
        <td></td>
        <th scope="col">Units Sold</th>
        <th scope="col">Total Value Sold</th>
        <th scope="col">Total Clicks from Referrals</th>
        <th scope="col">Total Referrals to Sales</th>
        <th scope="col">Total commission Paid Out</th>
    </tr>
  </thead>
  <tbody>
    <tr>
        <?php

        global $wpdb;

        $y='';

        for($i=30; $i>=0; $i--){

            $the_time = time() - ($i * 24 * 60 * 60);

            $the_date = date('m-d', $the_time);

            echo "<th scope=\"row\">" . $the_date . "</th>";

            $day_quant = '';

            $day_gross = '';

            $day_clicks = '';

            $day_completes = '';

            $day_payments = '';

            $iminus1 = '';

            $iminus1 = $i-1;

            $ipn_list = $wpdb->get_results("Select * FROM paypal_ipn WHERE paypal_date >= DATE_SUB(NOW(), INTERVAL $i day) AND paypal_date <= DATE_SUB(NOW(), INTERVAL $iminus1 day)");

            if($ipn_list!=null){

                foreach( $ipn_list as $ipn_data ){

                    $order_quant = $ipn_data->quantity;

                    $day_quant += $order_quant; 

                    $order_gross = $ipn_data->payment_gross;

                    $day_gross += $order_gross; 

                }

                echo "<td>" . $day_quant . "</td>";
                echo "<td>" . $day_gross . "</td>";  


            }else{

                echo "<td>0</td>"; 
                echo "<td>0</td>";  

            }

            $affiliate_list = $wpdb->get_results("Select * FROM wp_affiliatedata WHERE paypal_date >= DATE_SUB(NOW(), INTERVAL $i day) AND paypal_date <= DATE_SUB(NOW(), INTERVAL $iminus1 day)");

            if($affiliate_list!=null){

                foreach( $affiliate_list as $affiliate_data ){

                    $refer_clicks = $affiliate_data->uniques;

                    $day_clicks += $refer_clicks;   

                    $refer_completes = $affiliate_data->completes;

                    $day_completes += $refer_completes; 

                    $refer_payments = $affiliate_data->payments;

                    $day_payments += $refer_payments;   

                }               

                echo "<td>" . $day_clicks . "</td>";
                echo "<td>" .  $day_completes . "</td>";
                echo "<td>" .  $day_payments . "</td>";   

            }else{

                echo "<td>0</td>";
                echo "<td>0</td>";
                echo "<td>0</td>"; 
                echo "</tr>";   

            }


            }
        ?>

</tbody>
</table>

I want to make this a dashboard widget, so from what I’ve seen, I need to put the main script into 1 function and register the function..but how would third party jquery and css fit into that, if at all? Thanks so much for the help in advance!

  • 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-06-10T07:33:04+00:00Added an answer on June 10, 2026 at 7:33 am

    Amazing article, found everything I was looking for – http://www.jdmweb.com/resources/jquery_to_wordpress_plugin

    Here’s the code I needed with Fancybox as the example 3rd-party jquery plugin:

    //Group the code inside a function
    function fancybox_wp_setup(){
      wp_enqueue_style(
      "jquery.fancybox", WP_PLUGIN_URL."/jQuery2Wp_fancybox/jquery.fancybox-1.3.1.css", 
      false, "1.3.1");
    
      wp_enqueue_script("jquery");
    
      wp_enqueue_script(
      "jquery.fancybox", WP_PLUGIN_URL."/jQuery2Wp_fancybox/jquery.fancybox.js", 
      array("jquery"), "1.3.1",1);  
    
      wp_enqueue_script(
      "jquery.fancyboxsetup", WP_PLUGIN_URL."/jQuery2Wp_fancybox/fancybox-setup.js", 
      array("jquery","jquery.fancybox"), "",1);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can use this maven plugin maven-jaxb-plugin to generate Java Classes from XSD file.
For this userscript I'm writing, I need to use a third-party JavaScript library which
I'm new in Cocoa. My Application require to use third-party framework to be able
I want to use third party js in my html5 cache manifest. I don't
I realize you can use the upsize wizard in access to convert this normally
I have to use third party, unmanaged COM dll into my .NET application. I
So this is my situation. I have to consume a third party web service
I use third party library in my project. Call it like MainLibNET.dll . I
I can use the following to get the contents of a folder with no
Users can use their Google, Facebook or Twitter account to login to a site

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.