WordPress.org

Ready to get started?Download WordPress

Forums

Installing a jQuery plugin into a WordPress install (3 posts)

  1. ttj90
    Member
    Posted 2 years ago #

    Hi,

    Never tried installing a plugin that isn't actually a WordPress plugin but it is something I wish to have so I'm asking how it can be done?

    It's the - http://www.sharrre.com - jQuery plugin but I've no idea how to go about it nor do I know how to maintain it thereafter. I know I could do if someone could point me in the right direction.

  2. leonmagee
    Member
    Posted 2 years ago #

    You would need to know how to modify themes in order to do this, or how to create a plugin which is more complicated.

    Assuming the code for this jQuery plugin is one JavaScript file, you could add this file to your theme directory, and then add the following code to your theme's functions.php file:

    wp_enqueue_script('jquery');
    wp_register_script('name','file-folder/file-source.js');
    wp_enqueue_script('name');

    The WordPress jQuery library defaults to no-conflict mode, so if the jQuery plugin is using '$' instead of 'jQuery' it might not work, in which case you could load the Google jQuery library instead of the default WordPress one.

  3. ttj90
    Member
    Posted 2 years ago #

    I'm relatively comfortable with modifying themes...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags