After uploading the plugin file to a directory inside your theme, you will want to enqueue the plugin file in functions.php
You should already have a similar function in your functions.php file, but if you don’t yo can add it. Change false to true if you want the file to load in the footer instead of the header. In this example I put the file inside a folder named ‘js’ inside my theme folder.
//Enqueue scripts
function register_scripts() {
wp_enqueue_script('jplayer',get_template_directory_uri().'/js/jquery.jplayer.min.js',null,'1',false);
}
add_action('wp_enqueue_scripts','register_scripts');
//Enqueue styles
function register_styles() {
//($handle, $src, $deps, $ver, $media)
wp_enqueue_style('main_style',get_template_directory_uri().'/style.css?v=1',null,'0.1', $media="all");
}
add_action('wp_enqueue_scripts','register_styles');
Related Posts:
- Disable /wp-admin/plugin-install.php
- Removing the “Your backup folder MIGHT be visible to the public” Message Generated by the WP-DBManager Plugin
- Plugins not showing in dashboard->plugins section
- How to add favicon to my site – in both front end and admin panel
- Reordering themes in admin panel
- How do I email a new page password to somebody every month?
- Deactivate plugins only for mobile devices
- How can I attach images to a post from the media library?
- Gutenberg: How to use output of php render_callback function in the block editors backend?
- Custom database or Custom Post Types?
- How do I extract the Alt Text from an image attachment upload via the WordPress Options Framework Plugin?
- Visual Composer vs. Advanced Custom Fields [closed]
- Themes VS Plugins [duplicate]
- How to load plugin before the wordpress jquery?
- Does Quantity of files in a plugin affect performance?
- Why is my ajax call refreshing the page?
- Add CSS class to add-to-cart button, Woocommerce [closed]
- How to count number of records found in a database table?
- Can a WordPress plugin or theme contain a virus?
- Advanced Custom Fields query
- What is the way to ship read-me strings like plugin-strings for internationalization?
- Upload file inside plugins options page
- Plugin Expires Headers – W3 Total Cache [closed]
- Is there any way to get all the name or slug of template parts used in a page?
- how an array index could be a file path
- Best method to upgrade multisite plugin’s numerous database table
- Activated plugin is stored as an object, rather than as a path
- Problem converting tags to categories while having large number of tags
- Overriding functions in wordpress plugins
- Color java code the way it is colored in eclipse [closed]
- What is generating my meta og:description?
- Certain actions failing when run through cron
- How do you allow users tag a photo
- Changing “elapsed time” to “time remaining” on MP3-jPlayer audio player with CSS or PHP changes
- Send Custom welcome email to specific user group
- install robots.txt to wordpress website admin
- How to create a custom shortcode based on the layout?
- Installing plugins and using complex folder structure with child theme in WordPress
- Is it necessary to auto delete my WP plugin database tables when users deactivate/delete my plugin?
- Custom post types – remove default post supports through empty array?
- How to insert and call new data in wordpress website database through a plugin
- Repeated Output in Widget
- Where is this strange og:description coming from?
- Release the plugin in the WordPress repository where redux is used
- Dokan Marketplace store link in single product page
- How retreive saved data from gravity forms in my template?
- Ajax object not defined – JS file is in plugin folder
- Is there a good way to load tiny_mce_popup.js through editor.windowManager.open?
- Sharing functions between plugins
- Making the ‘add to cart’ button redirect to PayPal
- Is the bulk_action hook stable for use in 3.2.X?
- I/O Usage goes max. just after every new post published and WP site down
- Can’t load the the canges of field groups [duplicate]
- Disable recpacha for contact form 7 specific form
- Personality quiz in wordpress using a plugin
- Adding custom post category to categories widget
- How can we get this dynamically as this folder may not be by the same name always → wp-admin
- How to ignore fields if empty?
- Error messages in Multilingual part of the site
- Import 2000 posts from one website to another
- WordPress how do I change images used in plugins?
- wp_remote_post To external API multiple values with the same key
- Add WooCommerce vendor slug to auto-generated SKU
- Admin Custom Login loses settings on Code and Data migration
- redirect to a custom page
- custom REST endpoint not passing body of POST request to callback
- Add section (add_settings_section) to a custom page (add_submenu_page) not working
- cURL do not mimic click
- What action or filter can I use to change all the html returned from server for a page?
- Wordress admin page is fetching error You do not have sufficient permissions to access this page.
- How to change text in a page by utilizing a custom user id?
- How to hook into search results template or query?
- How can I insert a record into a custom table from my custom form in my custom admin page?
- how to create table during plugin installation in side a class
- Which WordPress version to use for improved plugin compatibility? [closed]
- WP_Filesystem usage within a block of code
- How can I retrieve data within my widget
- Why function hooked using object are executing at all time?
- Create a blank admin page from plugin
- Private WordPress blog, requires user registration approval, and allowing users to login with OpenID
- How do I make the selected layout display for all MarketPress pages?
- Which part of the plugin to change so the updater won’t register the next version?
- In my plugin when i call select page is blank
- include plugin folder directly in theme folder to load faster page n wp
- Including a PHP file via a function that is part of a plugin?
- How do i remove “Powered by WordPress” from AMP?
- Integrate Razorpay quick payments plugin with contact form7 plugin
- Publish post facebook page & twitter automatically [closed]
- How to know if your code is executed on wordpress.com and wordpress.org?
- I want to include My theme file (testing.php) to inside my plugin folder (myplugin/mypugin.php)
- How do I set register_meta for a specific CPT?
- How to Enfroce Domain Licensing Limits? [closed]
- Override plugin constant using a theme
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Update Content for a Custom Block Toolbar Button
- WordPress menu dissapear when I add a parameter to custom post archive
- Submitting form to admin-post.php WordPress
- WordPress Throwing Deprecated Errors on its own Files
- Changing slug when post is copied
- Show the author only own types of publications. (JetEngine, Elementor)