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
- Where is the best place to use add_filter
- How to remove duplicate sub-menu name for top level menu items in a plugin?
- When can you get current page ID and initialize hooks right after?
- category_name not working (not showing up in sql query debug)
- How can I make my custom shortcode work in a Custom HTML Widget?
- How to Loop Plugin Option Field Set?
- Using the ‘draft_to_publish’ hook (post status transition)
- Update Multiple Post Meta for the Same Post In One call?
- How do I configure WordPress to talk to a Microsoft SQL Server database?
- Which hook callback has priority if both plugin and theme use the same hook?
- WordPress widget / plugin….fields not appearing in my widget
- How to list the Hooks and order of execution in current loading page? [duplicate]
- How to Create a Directory in a Plugin Folder?
- Ajax call doesn’t work in frontend but it’s working in backend (when I’m logged in)
- Create plugin that works in background
- Checking for user role in a custom plugin
- Can a plugin add to header/footer/body content?
- Custom Shipping method not showing in checkout
- HELP: Integrating WP with raw PHP code once published button is hit
- Getting media library popup in custom plugin admin page
- jQuery function didn’t work in my plugin
- add_action in functions.php, do_action in plugin?
- add action for displaying posts using a shortcode
- Write to / remove from default .htaccess file from plugin?
- How to cancel WordPress’ action/filter when using OOP with anonymous callback
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- How can I get WordPress to save comments in markdown format?
- Is Wrapping intval() Around esc_attr() Redundant for Escaping Input?
- Programatically download a plugin
- How to Use Parameters with a Do_Action Function Within PHP Tags
- How would I go about creating a user ranked post popularity page?
- Redirection of users away from wp-admin (but not administrators)
- code is working properly in Core PHP but writing coding in WordPress
- How to check current user before all actions and filters?
- 306 MB of wp_options occupied by WordPress SEO Plugin, is that normal? [closed]
- Custom plugin init action causing general slowness
- Perform internal redirect in WordPress?
- How to prevent plugins from loading jQuery
- Inject HTML meta tag inside wordpress tag using add_shortcode
- Create a plugin from within WordPress
- Class variables not correct on page
- Why is one phpunit test throwing an error on one class when all other classes are similar without error?
- Duplicate results are displayed in a custom plugin [closed]
- Why is my custom post type not being activated on plug-in activation?
- Basic function call on init failing
- How to redirect to same page after form submission
- How do I add $_SESSION[”] to my wordpress page?
- I receive taxonomy id
- output html on post or page from custom plugin [closed]
- Loop in elementor custom widget not working
- Built a second plugin but it overwrote the first one
- Creating a functionality plugin to edit seriously simple podcasting
- Asynchronous request in wordpress
- Make plugin php file called directly aware of WordPress?
- Way to send multiple values for column to MySQL?
- Next Previous Post in wordpress with previous / next link with title?
- Different registration form for different roles
- Apply html elements in php statement
- WordPress Post HTML after Posting
- How to append new form elements in “Add New” form of Users in WordPress admin panel?
- Settings options not showing up on Sub Menu page in WordPress plugin
- Conditional delete metadata does not works
- The Build menu theme is frozen with the wordpress theme
- The function called on the wp head hook becomes null
- How can I translate something in my class constructor of my plugin in WordPress?
- Define global variable in theme file and call that variable in plugin file
- Rename a folder via HTML POST request
- How to translate to spanish wordpress hardcoded content/files?
- working code, not working – Plugin Dev
- SimpleXML is not working with xml response from external api
- WordPress plugin blog creation
- Multiple image selection custom widget
- Prefix WordPress Taxonomy Tags With Hashtag Symbol Like Twitter
- Change Woo Custom Endpoint Titles from a Plugin
- Nested Actions and Filters
- Passing function into add_action always returns the first argument
- submit form data to wordpress existing database table using my plugin
- echo plugin results on pages
- register_activation_hook doesn’t fire at all
- My ajax request don´t work and return 0
- Populate select option with JSON file
- Plugin Breaking WordPress Login
- How to get site homepage from plugin?
- Unable to show 4 products in a row
- What is the source outline for a basic word press plugin?
- Submit posts in two different post types with the same form
- wp_handle_upload – specified file failed upload test
- How to make a Template page to show the information of different things Shop and Product page?
- How to trigger plugin migration code when plugin updates?
- How to Save Category and Delete Category in same Function
- public custom posts not showing in my wordpress plugin
- Accessing Correct Database to Create REST API Endpoint
- Read page- or post-content across different builder-plugins
- How to make WordPress Plugin run on single specific Admin Page
- Error 400 Invalid “products[1].productId” Kinguin [closed]
- Custom page template from plugin does not work with pre-installed themes in WordPress 6.6.1
- How to customize WP_Error (REST JWT authentication plugin) [closed]