{"id":153,"date":"2015-09-07T18:35:48","date_gmt":"2015-09-07T18:35:48","guid":{"rendered":"http:\/\/sgcustomwebsolutions.com\/blog\/?p=153"},"modified":"2018-06-13T14:26:32","modified_gmt":"2018-06-13T14:26:32","slug":"load-jquery-plugin-wordpress","status":"publish","type":"post","link":"http:\/\/sgcustomwebsolutions.com\/blog\/load-jquery-plugin-wordpress\/","title":{"rendered":"How to Load a jQuery Plugin in WordPress"},"content":{"rendered":"<p class=\"post-content\">So you found a nifty jQuery plugin and you can&#8217;t wait to use it on your WordPress-powered site. But now you face the beginner&#8217;s challenge: how to install it without losing your sanity in the process. It&#8217;s not as difficult as it might seem if you know how to navigate the terrain. In this tutorial I&#8217;ll show you how to prepare, load, and call a jQuery plugin on a WordPress website.<\/p>\n<h3>The Plugin<\/h3>\n<p class=\"post-content\">For this example we are going to load a free responsive jQuery slider called <a href=\"http:\/\/pgwjs.com\/pgwslideshow\/\" target=\"_blank\" rel=\"noopener\">PgwSlideshow<\/a>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-167 alignnone\" src=\"http:\/\/sgcustomwebsolutions.com\/blog\/wp-content\/uploads\/2015\/09\/slideshow-screenshot-1024x737.jpg\" alt=\"pgwSlideshow Plugin\" width=\"609\" height=\"439\" srcset=\"http:\/\/sgcustomwebsolutions.com\/blog\/wp-content\/uploads\/2015\/09\/slideshow-screenshot-1024x737.jpg 1024w, http:\/\/sgcustomwebsolutions.com\/blog\/wp-content\/uploads\/2015\/09\/slideshow-screenshot-300x216.jpg 300w, http:\/\/sgcustomwebsolutions.com\/blog\/wp-content\/uploads\/2015\/09\/slideshow-screenshot.jpg 1035w\" sizes=\"auto, (max-width: 609px) 100vw, 609px\" \/><\/p>\n<p class=\"post-content\">Our plugin contains the following CSS and JQuery files:<\/p>\n<ul style=\"font-size: 16px;\">\n<li>pgwslideshow.css<\/li>\n<li>pgwslideshow.min.css<\/li>\n<li>pgwslideshow_light.css<\/li>\n<li>pgwslideshow_light.min.css<\/li>\n<li>pgwslideshow.js<\/li>\n<li>pgwslideshow.min.js<\/li>\n<\/ul>\n<p class=\"post-content\">The files with the &#8220;.min&#8221; extension are &#8220;minified&#8221; versions of the css and js files. A minified file is simply one that has been stripped of all extra space. They are virtually impossible to read, but they&#8217;re also smaller in size, so they load faster on your page.<\/p>\n<p class=\"post-content\">A jQuery plugin typically provides both regular and minified versions of the plugin files, but you should only load the min versions on your site for performance reasons. In this tutorial we will be loading <em>pgwslideshow.min.js<\/em> and <em>pgwslideshow.min.css<\/em>.<\/p>\n<h3 class=\"post-content\">The Prep<\/h3>\n<p class=\"post-content\">This tutorial makes a few important assumptions:<\/p>\n<ul style=\"font-size: 16px;\">\n<li class=\"post-content\" style=\"margin-bottom: 10px;\"><strong>You&#8217;re using a child theme<\/strong>. This is strongly recommended because it protects your changes from being overwritten by future theme upgrades.<\/li>\n<li class=\"post-content\" style=\"margin-bottom: 10px;\"><strong>You have a<em> functions.php<\/em> file in your child theme.<\/strong> If you don&#8217;t, you&#8217;ll need to<a href=\"https:\/\/codex.wordpress.org\/Child_Themes\" target=\"_blank\" rel=\"noopener\"> learn a little about this file<\/a> and create one before proceeding.<\/li>\n<li class=\"post-content\" style=\"margin-bottom: 10px;\"><strong>You&#8217;ve created folders in your child theme directory called <em>js<\/em>, <em>css<\/em>, and<em> images<\/em>.<\/strong> If you like to organize your files differently, just be sure to adjust the file paths in this tutorial accordingly.<\/li>\n<\/ul>\n<p class=\"post-content\">Okay, ready to make this happen? Let&#8217;s roll.<\/p>\n<h3>1. Make the Code Compatible with WordPress<\/h3>\n<p class=\"post-content\">First we need to tweak our jQuery file so it will work in the WordPress environment. WordPress comes loaded with the latest jQuery library, which is set to &#8216;No Conflict&#8217; mode to prevent clashes with other Javascript libraries you may be using. Consequently, jQuery scripts using the &#8220;$&#8221; symbol won&#8217;t work in WordPress.<\/p>\n<p class=\"post-content\">To fix the problem we&#8217;ll simply replace every occurrence of &#8220;$&#8221; with &#8220;jQuery&#8221; in <em>pgwslideshow.min.js<\/em> using the find\/replace function of a standard text editor. For example, this bit of code in our script:<\/p>\n<pre class=\"lang:default decode:true \">$(this).addClass('elt_' + element.id);<\/pre>\n<p class=\"post-content\">will become:<\/p>\n<pre class=\"lang:default decode:true \">jQuery(this).addClass('elt_' + element.id);<\/pre>\n<p class=\"post-content\">After saving the changes to <em>pgwslideshow.min.js<\/em>, we&#8217;ll place our plugin files at the following locations within WordPress:<\/p>\n<p class=\"post-content\"><em>pgwslideshow.min.js\u00a0<\/em> <i class=\"fa fa-long-arrow-right\" style=\"font-size: 28px; color: gray; position: relative; top: 5px;\"><\/i>\u00a0 <em>&lt;child-theme-directory&gt;\/js\/pgwslideshow.min.js. <\/em><\/p>\n<p class=\"post-content\"><em>pgwslideshow.min.css\u00a0<\/em> <i class=\"fa fa-long-arrow-right\" style=\"font-size: 28px; color: gray; position: relative; top: 5px;\"><\/i> <em>&lt;child-theme-directory&gt;\/css\/pgwslideshow.min.css.<\/em><\/p>\n<h3>2. Enqueue the Code in WordPress<\/h3>\n<p class=\"post-content\">Next we&#8217;ll add some code to <em>functions.php<\/em> that will tell WordPress to load our two plugin files. This code hooks into the &#8216;wp_enqueue_scripts&#8217; action that WordPress automatically executes whenever you load a page.<\/p>\n<p class=\"post-content\">Since the slideshow will be on a page entitled &#8220;My Photography,&#8221; our function only needs to load the plugin files when that page is accessed. Note that you could also use a blog post title within the <a href=\"https:\/\/codex.wordpress.org\/Function_Reference\/is_page\" target=\"_blank\" rel=\"noopener\">is_page()<\/a> check below:<\/p>\n<pre class=\"whitespace-before:1 whitespace-after:1 lang:default decode:true \">function load_slideshow_scripts() {\r\n\r\n       if(is_page('My Photography')) {\r\n            wp_register_style( 'slideshowstyle', get_stylesheet_directory_uri() . '\/css\/pgwslideshow.min.css', false, 0.1 ); \r\n            wp_enqueue_style( 'slideshowstyle' );      \r\n            wp_register_script( 'theslideshow', get_stylesheet_directory_uri() . '\/js\/pgwslideshow.js', array('jquery'), false, true );\r\n            wp_enqueue_script( 'theslideshow' ); \r\n        }\r\n}\r\nadd_action( 'wp_enqueue_scripts', 'load_slideshow_scripts' );<\/pre>\n<p class=\"post-content\">If you should later run into problems getting the slideshow to work, the code below can be temporarily added to the function above for debugging purposes. Just place these lines right after that last <em>wp_enqueue_script()<\/em> call:<\/p>\n<pre class=\"lang:default decode:true \">if(wp_script_is( 'theslideshow', 'enqueued' )) { echo \"&lt;BR&gt;Slideshow script enqueued successfully!\"; }\r\nif(wp_style_is( 'slideshowstyle', 'enqueued' )) { echo \"&lt;BR&gt;Slideshow style enqueued successfully!\"; }<\/pre>\n<p class=\"post-content\">This will display two success messages at the very top of the slideshow page upon successfully loading the plugin files. If those messages <em>don&#8217;t<\/em> appear when you hit the page, you&#8217;ve got a script loading problem on your hands.<\/p>\n<h3>3. Call the Script on a WordPress Page<\/h3>\n<p class=\"post-content\">Lastly, it&#8217;s time to place the necessary jQuery and HTML on our slideshow page. The PgwSlideshow plugin documentation provides the following example for calling the jQuery plugin on your web page:<\/p>\n<pre class=\"lang:default decode:true \">$(document).ready(function() {\r\n    $('.pgwSlideshow').pgwSlideshow();\r\n});<\/pre>\n<p class=\"post-content\">We&#8217;ll tweak this a bit to make it compatible with WordPress. First, navigate to the page where you want to put your slideshow, open it in edit mode, and click on the WordPress &#8220;text&#8221; editor tab. Then copy and paste the code below into the editor.<\/p>\n<p class=\"post-content\">Notice that we have replaced the &#8220;$&#8221; with &#8220;jQuery&#8221; for the reasons explained in step one. A few optional parameters have also been added in the function call to configure the slideshow. These can be modified or added to as desired. And below the jQuery function call is a sample template for the unordered list of slides that the plugin will need:<\/p>\n<pre class=\"lang:default decode:true\">&lt;script type=\"text\/javascript\"&gt;\r\njQuery(document).ready(function() {\r\n     jQuery('.pgwSlideshow').pgwSlideshow({\r\n          transitionEffect: \"fading\",        \r\n          transitionDuration: 650,\r\n          maxHeight: 700,          \r\n          displayControls: true\r\n     });\r\n});\r\n&lt;\/script&gt;\r\n&lt;ul class=\"pgwSlideshow\"&gt;\r\n     &lt;li&gt;&lt;img src='..\/wp-content\/themes\/your-child-theme-here\/images\/your-image-1.jpg' alt='Somewhere, USA' data-description='Some Description'&gt;&lt;\/li&gt;\r\n     &lt;li&gt;&lt;img src='..\/wp-content\/themes\/your-child-theme-here\/images\/your-img-2.jpg' alt='Somewhere, USA' data-description='Some Description'&gt;&lt;\/li&gt;\r\n     &lt;li&gt;&lt;img src='..\/wp-content\/themes\/your-child-theme-here\/images\/your-image-3.jpg' alt='Somewhere, USA' data-description='Some Description'&gt;&lt;\/li&gt;    \r\n&lt;\/ul&gt;\r\n<\/pre>\n<p class=\"post-content\">Now we have one final issue to address. WordPress automatically adds paragraph tags to your markup, which will actually prevent the jQuery call as formatted above from working. One way to fix the issue is to place the entire script call onto one single line like this:<\/p>\n<pre class=\"lang:default decode:true\">&lt;script type=\"text\/javascript\"&gt;jQuery(document).ready(function() { jQuery('.pgwSlideshow').pgwSlideshow({transitionEffect: \"fading\", transitionDuration: 650, maxHeight: 700, displayControls: true});});&lt;\/script&gt;<\/pre>\n<p class=\"post-content\">However, the line is now more difficult to read. If you prefer to keep the original formatting you can disable the auto paragraphs instead with a handy little WordPress plugin called Raw HTML. This plugin adds a widget on the WP page editor that allows us to switch off auto paragraphs for a given page as shown below:<\/p>\n<p><a href=\"http:\/\/sgcustomwebsolutions.com\/blog\/wp-content\/uploads\/2015\/09\/raw-html1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-283 alignleft\" src=\"http:\/\/sgcustomwebsolutions.com\/blog\/wp-content\/uploads\/2015\/09\/raw-html1-300x191.jpg\" alt=\"Raw HTML\" width=\"300\" height=\"191\" srcset=\"http:\/\/sgcustomwebsolutions.com\/blog\/wp-content\/uploads\/2015\/09\/raw-html1-300x191.jpg 300w, http:\/\/sgcustomwebsolutions.com\/blog\/wp-content\/uploads\/2015\/09\/raw-html1.jpg 308w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h3><\/h3>\n<p class=\"post-content\">Save your changes to the slideshow page, and that&#8217;s all there is to it. Mission accomplished!<\/p>\n<h3>Conclusion<\/h3>\n<p class=\"post-content\">As we&#8217;ve seen, loading a jQuery plugin in WordPress is relatively painless when you&#8217;re armed with the right information. And the principles discussed here apply to any jQuery plugin you may want to install on WordPress. Check out my live demo of this slideshow plugin &#8211; and enjoy a few nature photos while you&#8217;re at it &#8211; on my <a href=\"http:\/\/www.sgcustomwebsolutions.com\/blog\/my-photography\/\" target=\"_blank\" rel=\"noopener\">photography page<\/a>. Please note that I have adjusted the css and used Adobe Photoshop Elements to create uniformly-sized slides for optimal viewing.<\/p>\n<p class=\"post-content\">Good luck, and happy plugging!<\/p>\n<p class=\"post-content\"><em>Did you find this post helpful? Say thanks by clicking the Facebook &#8220;like&#8221; button below!<\/em><\/p>\n<h3>Resources<\/h3>\n<p class=\"post-content\"><a href=\"https:\/\/api.jquery.com\/jquery.noconflict\/\" target=\"_blank\" rel=\"noopener\">jQuery Documentation on &#8216;No Conflict&#8217; Mode<\/a><\/p>\n<p class=\"post-content\"><a href=\"https:\/\/codex.wordpress.org\/Child_Themes\">WordPress Codex: Child Themes and functions.php<\/a><\/p>\n<p class=\"post-content\"><a href=\"https:\/\/codex.wordpress.org\/Function_Reference\/wp_enqueue_script\" target=\"_blank\" rel=\"noopener\">WordPress Codex: Enqueing Scripts<\/a><\/p>\n<p class=\"post-content\"><a href=\"https:\/\/wordpress.org\/plugins\/raw-html\/\">Raw HTML WordPress Plugin<\/a><\/p>\n<p class=\"post-content\"><a href=\"https:\/\/github.com\/Pagawa\/PgwSlideshow\" target=\"_blank\" rel=\"noopener\">PgwSlideshow jQuery Plugin<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So you found a nifty jQuery plugin and you can&#8217;t wait to use it on your WordPress-powered site. But now you face the beginner&#8217;s challenge: how do you install it without losing your sanity in the process? It\u2019s not as difficult as it might seem if you know how to navigate the terrain.<\/p>\n","protected":false},"author":3,"featured_media":967,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[4,5,6],"tags":[12,10,17,11,13,8,14,15,18,16],"class_list":["post-153","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jquery","category-php","category-wordpress","tag-enqueue-jquery-script-wordpress","tag-install-jquery-plugin-wordpress","tag-jquery-slideshow","tag-load-jquery-plugin","tag-load-jquery-slideshow-wordpress","tag-loading-jquery-plugins","tag-pgwslideshow","tag-raw-html","tag-responsive-jquery-slideshow","tag-tutorial-wordpress-jquery-plugin"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Load a jQuery Plugin in WordPress<\/title>\n<meta name=\"description\" content=\"This tutorial explains how to prepare, load, and call a jQuery plugin on a WordPress website.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/sgcustomwebsolutions.com\/blog\/load-jquery-plugin-wordpress\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Load a jQuery Plugin in WordPress\" \/>\n<meta property=\"og:description\" content=\"This tutorial explains how to prepare, load, and call a jQuery plugin on a WordPress website.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/sgcustomwebsolutions.com\/blog\/load-jquery-plugin-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"Solution Central\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/sgcustomwebsolutions?ref=hl\" \/>\n<meta property=\"article:published_time\" content=\"2015-09-07T18:35:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-06-13T14:26:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/sgcustomwebsolutions.com\/blog\/wp-content\/uploads\/2015\/09\/jquery-plugins-4.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1152\" \/>\n\t<meta property=\"og:image:height\" content=\"666\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Sarah\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sarah\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/sgcustomwebsolutions.com\/blog\/load-jquery-plugin-wordpress\/\",\"url\":\"https:\/\/sgcustomwebsolutions.com\/blog\/load-jquery-plugin-wordpress\/\",\"name\":\"How to Load a jQuery Plugin in WordPress\",\"isPartOf\":{\"@id\":\"https:\/\/sgcustomwebsolutions.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/sgcustomwebsolutions.com\/blog\/load-jquery-plugin-wordpress\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/sgcustomwebsolutions.com\/blog\/load-jquery-plugin-wordpress\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/sgcustomwebsolutions.com\/blog\/wp-content\/uploads\/2015\/09\/jquery-plugins-5.jpg\",\"datePublished\":\"2015-09-07T18:35:48+00:00\",\"dateModified\":\"2018-06-13T14:26:32+00:00\",\"author\":{\"@id\":\"https:\/\/sgcustomwebsolutions.com\/blog\/#\/schema\/person\/2e1ccd445918e421da29373adf45dbd5\"},\"description\":\"This tutorial explains how to prepare, load, and call a jQuery plugin on a WordPress website.\",\"breadcrumb\":{\"@id\":\"https:\/\/sgcustomwebsolutions.com\/blog\/load-jquery-plugin-wordpress\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/sgcustomwebsolutions.com\/blog\/load-jquery-plugin-wordpress\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/sgcustomwebsolutions.com\/blog\/load-jquery-plugin-wordpress\/#primaryimage\",\"url\":\"http:\/\/sgcustomwebsolutions.com\/blog\/wp-content\/uploads\/2015\/09\/jquery-plugins-5.jpg\",\"contentUrl\":\"http:\/\/sgcustomwebsolutions.com\/blog\/wp-content\/uploads\/2015\/09\/jquery-plugins-5.jpg\",\"width\":1152,\"height\":600},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/sgcustomwebsolutions.com\/blog\/load-jquery-plugin-wordpress\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/sgcustomwebsolutions.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Load a jQuery Plugin in WordPress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/sgcustomwebsolutions.com\/blog\/#website\",\"url\":\"https:\/\/sgcustomwebsolutions.com\/blog\/\",\"name\":\"Solution Central\",\"description\":\"WordPress, PHP &amp; Graphic Design Tips\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/sgcustomwebsolutions.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/sgcustomwebsolutions.com\/blog\/#\/schema\/person\/2e1ccd445918e421da29373adf45dbd5\",\"name\":\"Sarah\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/sgcustomwebsolutions.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/sgcustomwebsolutions.com\/blog\/wp-content\/uploads\/2015\/10\/Very-Newest-Me-150x150.gif\",\"contentUrl\":\"http:\/\/sgcustomwebsolutions.com\/blog\/wp-content\/uploads\/2015\/10\/Very-Newest-Me-150x150.gif\",\"caption\":\"Sarah\"},\"description\":\"Sarah holds a B.S. in Information Science and worked in the corporate world as a software engineer for 12 years before striking out as a freelance WordPress web developer in 2013. When she is not furiously coding away, she can be found outdoors exploring Florida's natural beauty with a camera in hand.\",\"sameAs\":[\"http:\/\/www.sgcustomwebsolutions.com\",\"https:\/\/www.facebook.com\/sgcustomwebsolutions?ref=hl\",\"www.linkedin.com\/in\/SarahGilesSGCWS\"],\"url\":\"http:\/\/sgcustomwebsolutions.com\/blog\/author\/sarah-giles\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Load a jQuery Plugin in WordPress","description":"This tutorial explains how to prepare, load, and call a jQuery plugin on a WordPress website.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/sgcustomwebsolutions.com\/blog\/load-jquery-plugin-wordpress\/","og_locale":"en_US","og_type":"article","og_title":"How to Load a jQuery Plugin in WordPress","og_description":"This tutorial explains how to prepare, load, and call a jQuery plugin on a WordPress website.","og_url":"https:\/\/sgcustomwebsolutions.com\/blog\/load-jquery-plugin-wordpress\/","og_site_name":"Solution Central","article_author":"https:\/\/www.facebook.com\/sgcustomwebsolutions?ref=hl","article_published_time":"2015-09-07T18:35:48+00:00","article_modified_time":"2018-06-13T14:26:32+00:00","og_image":[{"width":1152,"height":666,"url":"https:\/\/sgcustomwebsolutions.com\/blog\/wp-content\/uploads\/2015\/09\/jquery-plugins-4.jpg","type":"image\/jpeg"}],"author":"Sarah","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Sarah","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/sgcustomwebsolutions.com\/blog\/load-jquery-plugin-wordpress\/","url":"https:\/\/sgcustomwebsolutions.com\/blog\/load-jquery-plugin-wordpress\/","name":"How to Load a jQuery Plugin in WordPress","isPartOf":{"@id":"https:\/\/sgcustomwebsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/sgcustomwebsolutions.com\/blog\/load-jquery-plugin-wordpress\/#primaryimage"},"image":{"@id":"https:\/\/sgcustomwebsolutions.com\/blog\/load-jquery-plugin-wordpress\/#primaryimage"},"thumbnailUrl":"http:\/\/sgcustomwebsolutions.com\/blog\/wp-content\/uploads\/2015\/09\/jquery-plugins-5.jpg","datePublished":"2015-09-07T18:35:48+00:00","dateModified":"2018-06-13T14:26:32+00:00","author":{"@id":"https:\/\/sgcustomwebsolutions.com\/blog\/#\/schema\/person\/2e1ccd445918e421da29373adf45dbd5"},"description":"This tutorial explains how to prepare, load, and call a jQuery plugin on a WordPress website.","breadcrumb":{"@id":"https:\/\/sgcustomwebsolutions.com\/blog\/load-jquery-plugin-wordpress\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/sgcustomwebsolutions.com\/blog\/load-jquery-plugin-wordpress\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/sgcustomwebsolutions.com\/blog\/load-jquery-plugin-wordpress\/#primaryimage","url":"http:\/\/sgcustomwebsolutions.com\/blog\/wp-content\/uploads\/2015\/09\/jquery-plugins-5.jpg","contentUrl":"http:\/\/sgcustomwebsolutions.com\/blog\/wp-content\/uploads\/2015\/09\/jquery-plugins-5.jpg","width":1152,"height":600},{"@type":"BreadcrumbList","@id":"https:\/\/sgcustomwebsolutions.com\/blog\/load-jquery-plugin-wordpress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/sgcustomwebsolutions.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Load a jQuery Plugin in WordPress"}]},{"@type":"WebSite","@id":"https:\/\/sgcustomwebsolutions.com\/blog\/#website","url":"https:\/\/sgcustomwebsolutions.com\/blog\/","name":"Solution Central","description":"WordPress, PHP &amp; Graphic Design Tips","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/sgcustomwebsolutions.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/sgcustomwebsolutions.com\/blog\/#\/schema\/person\/2e1ccd445918e421da29373adf45dbd5","name":"Sarah","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/sgcustomwebsolutions.com\/blog\/#\/schema\/person\/image\/","url":"http:\/\/sgcustomwebsolutions.com\/blog\/wp-content\/uploads\/2015\/10\/Very-Newest-Me-150x150.gif","contentUrl":"http:\/\/sgcustomwebsolutions.com\/blog\/wp-content\/uploads\/2015\/10\/Very-Newest-Me-150x150.gif","caption":"Sarah"},"description":"Sarah holds a B.S. in Information Science and worked in the corporate world as a software engineer for 12 years before striking out as a freelance WordPress web developer in 2013. When she is not furiously coding away, she can be found outdoors exploring Florida's natural beauty with a camera in hand.","sameAs":["http:\/\/www.sgcustomwebsolutions.com","https:\/\/www.facebook.com\/sgcustomwebsolutions?ref=hl","www.linkedin.com\/in\/SarahGilesSGCWS"],"url":"http:\/\/sgcustomwebsolutions.com\/blog\/author\/sarah-giles\/"}]}},"_links":{"self":[{"href":"http:\/\/sgcustomwebsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/153","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/sgcustomwebsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/sgcustomwebsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/sgcustomwebsolutions.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/sgcustomwebsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=153"}],"version-history":[{"count":315,"href":"http:\/\/sgcustomwebsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/153\/revisions"}],"predecessor-version":[{"id":1193,"href":"http:\/\/sgcustomwebsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/153\/revisions\/1193"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/sgcustomwebsolutions.com\/blog\/wp-json\/wp\/v2\/media\/967"}],"wp:attachment":[{"href":"http:\/\/sgcustomwebsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/sgcustomwebsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=153"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/sgcustomwebsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}