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?
- Conditionally enqueue a widget’s script/stylesheet in HEAD (only when present on page!)
- 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
- Adding a text domain to every __(), _e() and __n() gettext call without a plan to create own translations
- Function to activate WordPress theme inside a plugin
- Seeking clarification on page request life-cycle
- 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
- Unable to load stylesheets and scripts to plugin settings page
- How can I get full attachment url from wp_get_attachment_metadata?
- WP theme with Backbone
- 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
- Include Max mega menu Plugin into theme
- How to integrate plugin in WordPress theme
- How to include plugin without activation?
- How do you remove plugin edit option?
- Override the filter from plugin in child theme
- WordPress logo upload option in theme panel
- wordpress theme backend admin only
- how to load the language file in plugin?
- How to get current post user id
- Different UI in WordPress
- The problem with WordPress Importer
- Why does my functions.php cause white-screen and media-library issues?
- 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
- How can I position ShareThis buttons manually when using the plug-in? [closed]
- Plugin can not display in my custom theme
- WordPress premium theme development [duplicate]
- How do I combine a theme with a plugin
- how to force tag page layout to use same as search layout?
- How to show the number of website visitors in my theme
- How to write “alt” tag in image for wordpress code?
- Register Script in Plugin Widget
- How to connect rating to individual comments?
- 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
- is_rtl returns false while it should return true
- Set up functions to be overridden without using function_exists() by short-circuiting them?
- Widget for specific category
- How to customize this theme? [closed]
- Don’t load the theme for a page FROM a plugin EDITED
- Extending a theme: build new features as plugin or core modules?
- Remember the Meta Value With Radio Buttons
- WordPress plugin with its own “site”/theme
- Theme Functions run a function upon activation or preview
- Polldaddy doesn’t show up on own theme
- Is there a way to keep youtube videos from displaying on home page, and display only on single posts?
- Warning: Attempt to read property “ID” on null in C:\xampp\htdocs\Nnamdi1\wp-content\plugins\elementor\core\base\document.php on line 250 [closed]
- Seperate plugin and theme files
- Elementor Sidebar not loading when PRO elements plugin is active
- How would I get the new plugin version on this function?
- Unpublished Pages Failing To Appear On Custom Path
- How to add specific script to WordPress webpage that will working with user input and databases
- How to get checkbox by default true in metabox?
- Why can I not deregister my style and script on custom post type?
- How much PHP and MySQL or MariaDB knowledge should I know to start writing WordPress themes and plug-ins and whatever else a beginner can edit?
- 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
- Can you develop themes and plugins while using the hosting services BlueHost? [closed]
- Show content from plugin on index
- Adding javascript to header of MetroMagazine theme
- Get plugin to background of page
- How to add wordpress plugins in along with my standalone theme
- Is there a way to include some external script to some or all pages in a wordpress site?
- How can I add different menus (different style menu) on each page?
- Site is setup statically – how to make it content managable?
- How to create post comparison in wordpress
- Open graph issue on my theme
- Javascript as Jquery Function Call?
- Detect if you’re in the “Frontend Editor” mode in Visual Composer WordPress [closed]
- Can anyone tell some online tuts for plugin development for beginner? [closed]
- How to escape html code?
- manage_{taxonomy}_custom_column not working
- Scripts don’t enqueue after removing plugin
- I want to include My theme file (testing.php) to inside my plugin folder (myplugin/mypugin.php)
- How to Enfroce Domain Licensing Limits? [closed]
- Override plugin constant using a theme
- add_meta_box showing blank screen in my page
- How to create an Info Box on WordPress [closed]
- How to make content as required in custom post type?
- What are Seeds? [closed]