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
- wp_head filter not executed inside custom class
- jQuery function didn’t work in my plugin
- add action wp_head not working
- What are the benefit in adding hook in the init() hook?
- Sanitizing, Validating and Escaping in WordPress (Plugin)
- add_action in functions.php, do_action in plugin?
- Escape when echoed
- Scope for PHP Variables Assigned in functions.php or a plugin
- Plugin exceeds memory limit
- add action for displaying posts using a shortcode
- Write to / remove from default .htaccess file from plugin?
- ‘wp_login’ action hook not working with wp-login.php file
- Update Option Error: Notice: Undefined index
- Plugin Development sqlite or WordPress’ database
- 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 to trigger $_GET request within admin plugin page?
- How to generate video out of images via WordPress plugin
- How can I get WordPress to save comments in markdown format?
- WooCommerce get_price returning wrong price when used via ajax
- How to ‘clone’ a wp plugin to make small changes
- Open Post Thumbnail in New Child Theme File in WordPress
- Where should I save an API key of my user when installing my plugin?
- Is Wrapping intval() Around esc_attr() Redundant for Escaping Input?
- Programatically download a plugin
- Redirecting to home page after login as custom role WordPress
- How to Use Parameters with a Do_Action Function Within PHP Tags
- Add keywords meta to index.php page
- Custom form action to handle data inside a plugin
- Self deactivate plugins after an action occurs
- Pulling data from custom plugin settings using PHP shortcode and Javascript
- How to periodically scrape and cache strings from remote txt files. – My First Plugin
- How to stop or remove an action being called inside a function of an extended class
- Automatically add attributes to woocommerce product?
- WP Post Template – Templates in own folder
- Any hook for pre-plugin-update -either bulk or single plugin update
- Avoid class name collision when using third party libraries in plugins?
- Edit Yoast SEO breadcrumbs output [closed]
- When to load auto-login code?
- How would I go about creating a user ranked post popularity page?
- How to get all of the activate_plugin action parameters?
- Redirection of users away from wp-admin (but not administrators)
- Using a custom plugin to capture input data via Ajax and PHP
- code is working properly in Core PHP but writing coding in WordPress
- Creating a custom post type, adding custom meta fields, preventing all future editability of posts of this type
- How to fetch products with the price in a page on woocommerce using a form or live search with php
- How to check current user before all actions and filters?
- 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?
- Creating a Callback URL for WordPress Woocommerce to update Order Status
- Get Time Taken By Each Action Hook in WordPress
- 306 MB of wp_options occupied by WordPress SEO Plugin, is that normal? [closed]
- Are functions in main plugin file called before function bound to register_activation_hook runs?
- Removing an action from wp_footer called in a class that’s inside a bigger class
- What are the specifics of WordPress development I need to know? [closed]
- Ajax call returning 0
- How to deal with WordPress and Pocket API to automate content curation on my hosted wordpress blog? [closed]
- Custom plugin init action causing general slowness
- WP All Import – Execute Imports
- How to replace WordPress Media Upload Window with user’s device window?
- Conditional attributes and logic per product category
- How to create a custom post type that contains another custom post type?
- Perform internal redirect in WordPress?
- How to prevent plugins from loading jQuery
- WordPress get_avatar function not correct working
- Inject HTML meta tag inside wordpress tag using add_shortcode
- Redirect to another page using contact form 7? [closed]
- What is @Action in WordPress?
- Setup wp_schedule_event within a custom plugin
- Create a plugin from within WordPress
- Add action to fire when a published post is updated
- Class variables not correct on page
- can’t unzip file
- How to Call Specific .PHP file on add_submenu_page selection in Plugin Development?
- How to Add text value in Automatically in this conditions?
- Checkbox show / hide output result
- i need to make custom cron_schedule with custom interval time as a parameter into a custom payment gateway plugin wordpress
- save_post_product action not firing
- Conditional delete metadata does not works
- How to get the custom field value using SQL query
- 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?
- admin_notices show after load completed
- Prevent WordPress from sending set-cookie http header
- Cookie value changes back to previous value after changing
- Change plugin descriptions
- How can we get this dynamically as this folder may not be by the same name always → wp-admin
- How use wp_insert_post and add og:custom tags?
- Is there any way to sync Facebook Comments and with comments on WordPress website?
- The Build menu theme is frozen with the wordpress theme
- Problem with checked box on wp car manager plugin
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- Why do actions with class and public method don’t fire __construct()
- The function called on the wp head hook becomes null
- Hide content for specific users with id