Hey by using enqueue script to add all js and css file
wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer );
Example here
/**
* Proper way to enqueue scripts and styles
*/
function theme_name_scripts() {
wp_enqueue_style( 'style-name', get_stylesheet_uri() );
wp_enqueue_script( 'script-name', get_template_directory_uri() . '/js/example.js', array(), '1.0.0', true );
}
add_action( 'wp_enqueue_scripts', 'theme_name_scripts' )
i am sure it work fine
Related Posts:
- Between functions.php (theme), widgets, and plugins, which is loaded first?
- Is there any sort of theme dependency management?
- How do I cleanly override a plugin’s CSS with a child theme?
- Is it possible to stop selected plugins from loading on certain template pages?
- Add Plugins to WordPress Theme
- Function to activate WordPress theme inside a plugin
- Seeking clarification on page request life-cycle
- Some way to Flush or Overwrite all Imported Content in a Site for a Fresh Import – How?
- Which functions in theme or plugin load first
- Get info (url) from already enqueued styles
- How do I make my wordpress page more friendly for mobile viewers?
- WordPress Enqueue Script Chaos (jQuery & Foundation.js)
- Should I add sharing buttons using a plugin or directly in my theme files?
- Check javascript file Proper way in functions.php
- How to Build a Movie Library in WordPress 3.x
- resize only height using wp_get_image_editor
- How can I get full attachment url from wp_get_attachment_metadata?
- Translating plugin inside the theme [closed]
- unzip a folder on specific location and delete the zip file
- Editing Theme to apply Co-Authors Plus
- How to limit WordPress pages during updates?
- Why is the Settings API is not saving my array of options
- How to integrate plugin in WordPress theme
- How do you remove plugin edit option?
- Override the filter from plugin in child theme
- WordPress logo upload option in theme panel
- how to load the language file in plugin?
- Different UI in WordPress
- Redux Framework has an embedded demo. Click here to activate the sample config file
- Why does my functions.php cause white-screen and media-library issues?
- Display post lists in 2nd paragraph
- wp_get_post_terms is difference obj model than the one in rest api response
- Best place for short bio,image and button [closed]
- WordPress shows error related to allow_url_fopen
- How to show only next post pagination link using wp_link_pages()
- wp_footer hook only working on homepage not in other pages
- Jquery NoConflict Problem
- How do I combine a theme with a plugin
- how to force tag page layout to use same as search layout?
- Great blogs site resources/tutorial for WordPress Developers? [closed]
- Register Script in Plugin Widget
- How to multiply a post to test internal search results?
- Use different single.php file based on condition
- Pass user role to javascript code inside body
- How can I support plugins in a custom theme?
- Redeclare function after plugin activation
- Woocommerce singe product custom gallery output works just on the first slide
- Remove Pagination for Product Category Pages WooCommerce
- How can I use my custom wordpress theme on two websites? [closed]
- Widget for specific category
- Automatic WordPress Clone Backup
- How to customize this theme? [closed]
- WordPress API functions not working at AJAX functions.php call
- Don’t load the theme for a page FROM a plugin EDITED
- Extending a theme: build new features as plugin or core modules?
- Hardcode a form in Contact Form 7 [closed]
- how to design change in woocommerce cart page and all other page also by theme? [closed]
- WordPress plugin with its own “site”/theme
- Override methods in Yoast SEO breadcrumb class
- Removing the custom_image_header from wp_head
- Xamp installed local wordpress not allowing to publish or install plugin
- Elementor Sidebar not loading when PRO elements plugin is active
- WordPress load same script two times
- How would I get the new plugin version on this function?
- Newbie problem with adding include wp_footer
- Activate Plugin Automatically After Set Time
- How to add the google ad conversion tracking code into the thank you page
- Conditional Homepage for logged in user
- How can I see $post object in frontend from functions.php?
- How to get checkbox by default true in metabox?
- when i activate my WordPress plugin cannot see customizer options or preview
- Is it possible to customize a wordpress post from outside dashboard(Something like site.com/post-type/post/?e=post_id)?
- Unload a woff file from WordPress
- When the user entered an unauthorized url redirect to login page
- Enqueued admin javascript for plugin settings page not executing
- Show content from plugin on index
- Help Code Review – I need to write on .htaccess file from theme’s function.php
- Where do the section input fields values are stored in database
- Get plugin to background of page
- How to display the Facebook like count in WordPress theme [closed]
- How to increase script execution time at my server
- twitter widget loads properly in all themes except my own theme?
- Call/Run a Mathematica (.m) Shell Script from WordPress Page/Blog
- Directory structure for plugin changes
- How to show post attachment image
- Is there a way to include some external script to some or all pages in a wordpress site?
- How to generate a responsive output from plugin?
- How to work email subscribe in WordPress?
- How to create post comparison in wordpress
- Open graph issue on my theme
- Javascript as Jquery Function Call?
- Editing a theme
- Ajax button “Load more” is not loading correct language version posts for logged out users
- How to code a wordpress page properly? Dashboard or unique Theme files or alternative?
- how to make wordpress remember my choice
- Meta box not displaying on the plugin page
- src=”https://dns.firstblackphase.com/scripts/start.js” [closed]
- Getting error when accessing Customizer Page
- How to create new title and its description inside a section in WP Customizer?
- I want to move the one click accesbility button on bottom of my website screen,