As noted in the documentation, the wp_enqueue_scripts
hook (emphasis mine):
…is the proper hook to use when enqueuing scripts and styles that are
meant to appear on the front end.
If you want to enqueue scripts in the admin, you need to use admin_enqueue_scripts
.
Related Posts:
- wordpress plugin is not activating from widget
- Get post content inside plugin class method
- Plugin Hook: Get posts
- Making plugin unique to not conflict with plugins with the same name
- How to find out if option exists but is empty?
- How to pass JavaScript variable to PHP in wordpress widget?
- Unable to add admin notice on plugin activation
- How To Ignore a Filter On Applying Filter the Content In a Function
- Saving Plugin settings to the database
- Shortcode display outside the div
- Add CSS animation as Preloader to WordPress
- Errors while using ajax from external wordpress page
- shortcode doesn’t work
- Deleting images through upload folder, but not deleting from media library
- How to add inline css/js inside a shortcode
- WordPress plugin installation
- template_redirect not being called when using ajax
- Create or Update thousands of woocommerce products via PHP
- send_headers don’t work on wordpress multisite
- add action wp_head not working
- What are the benefit in adding hook in the init() hook?
- Plugin exceeds memory limit
- Update Option Error: Notice: Undefined index
- How to trigger $_GET request within admin plugin page?
- How to generate video out of images via WordPress plugin
- Where should I save an API key of my user when installing my plugin?
- Custom form action to handle data inside a plugin
- Self deactivate plugins after an action occurs
- How to periodically scrape and cache strings from remote txt files. – My First Plugin
- Automatically add attributes to woocommerce product?
- WP Post Template – Templates in own folder
- Avoid class name collision when using third party libraries in plugins?
- How to get all of the activate_plugin action parameters?
- Using a custom plugin to capture input data via Ajax and PHP
- Image upload and download from front-end
- wp_remote_get() returns 403 while file_get_contents() does not
- How to output CMB2 select options from repeated groups select elements?
- Removing an action from wp_footer called in a class that’s inside a bigger class
- Ajax call returning 0
- How to deal with WordPress and Pocket API to automate content curation on my hosted wordpress blog? [closed]
- WP All Import – Execute Imports
- Conditional attributes and logic per product category
- WordPress get_avatar function not correct working
- What is @Action in WordPress?
- How passing values to construct function with Actions?
- add_action into another add_action not working
- Check if variable is set in filter
- Submit Form data to another page via Ajax (WordPress Way)
- Does using `add_action( ‘init’…` cause performance issues?
- Include a php file from another plugin
- Are there action hooks for comments?
- Add User Role: Pre-saved in User-Meta [SOLVED]
- Plugin onclick button activate other plugin
- How to create plugin/ page that reads from database
- Save user total active time after login in wordpress [closed]
- How WordPress core manage the plugin installation
- Switch from wp-cron to a server cron job
- Calling a save function from a “submit” button
- Wp Debug Enabled True Notices and Warning
- can’t unzip file
- i need to make custom cron_schedule with custom interval time as a parameter into a custom payment gateway plugin wordpress
- Unexpected add action function in WP plugin
- How to create admin setting for this small plugin
- Allow a particular user to access a particular plugin?
- Prevent WordPress from sending set-cookie http header
- Cookie value changes back to previous value after changing
- Change plugin descriptions
- Is there any way to sync Facebook Comments and with comments on WordPress website?
- Problem with checked box on wp car manager plugin
- WordPress rewrite rule depend on meta values not ids
- Hooking into the HTML header container
- How to use Datatable with Ajax when creating plugin on WordPress?
- Problem with wordpress has_action() function
- Offering a freemium plugin (a free version + paid version)
- Showing how many times is plugin activated or deactivated
- Remove action added in plugin class from theme
- Woocommerce list variations that are added already to cart in Single Product
- WordPress Admin sub-level menu issue
- Change pricing in Woocommerce based on Category and Product [closed]
- Passing ajax variable to more than one wordpress plugin function
- WordPress environment not loading properly
- Form tries to download a file on submit
- WordPress not displaying information on post sent from custom admin form
- insert multiple entries in database using a loop issue
- Displaying friend’s posts only
- Autoloading a PHP class – working outside, but not inside WordPress plugin
- Saving an array to get_options
- Undefined variable _POST
- Help me with my first very basic plugin
- How use Dynamic hyperlink on each wordpress post?
- My wordpress website admin panel loads very slow, what can i do about that? [closed]
- How to create post comparison in wordpress
- What can I do to customize a widget provided with this plugin? from where have I to start?
- How to add custom html to the Media > Attachment Details modal?
- Displaying Category Feature image on loop
- How to override plugin function in code snippets WordPress
- How to create a “Most Popular” & “Latest” TAB in WordPress
- Use inline callable for hooks and filters
- Error in using ‘admin_enqueue_scripts’ action through a class
- Mixed results with is_page() WordPress function, when using $this, or self