This fixed it…
function xsmi_load_admin_script() {
wp_register_style( 'chosencss', plugins_url( 'assets/chosen.css', __FILE__ ), true, '', 'all' );
wp_register_script( 'chosenjs', plugins_url( 'assets/chosen.jquery.js', __FILE__ ), array( 'jquery' ), '', true );
wp_enqueue_style( 'chosencss' );
wp_enqueue_script( 'chosenjs' );
}
Related Posts:
- Load script and styles using an array of resources
- Enqueue less file not working in child theme?
- How to enqueue CSS and JS only on specific template?
- Deregistering a script in WordPress seems impossible
- Plugin CSS not enqueing
- Font Awesome changing default WordPress Font
- Is the wp_enqueue method efficient?
- linking stylesheets and scripts with functions.php
- How to: Conditionally Enqueue JS and Stylesheets, for Custom Post Type (Single and Archive Templates)
- Enqueueing a code block from an options framework
- Ajax on the Administration Side of plugin – wp_localize_script – how to pass value from JQuery to PHP function in class?
- Enqueue assets from multiple directories using add_action/do_action
- Call a single function on two different methods with hooks
- Enqueue sripts and styles only if function is called
- How can I print out a single stylesheet or javascript link?
- wp_enqueue_style conflict when using in different action hooks
- functions.php doesn’t load all custom theme assets
- When to use Exceptions vs Error Objects vs just plain false/null
- Load js/css files only on specific admin UI pages
- Get list of scripts / styles and show file which enqueued them
- WordPress URL Rewrite not working
- Detect a focus on wp_editor
- simple wordpress ajax plugin not working when not logged in
- Utilize WP-CLI from inside WordPress, not SSH
- Saving metabox repeatable fields
- how to create and show sessions in word press?
- Understanding child theme functions.php
- do not show web page section when using advanced custom fields pro
- How to get all existing post types
- New Plugin Review
- Create custom blocks for bootstrap
- action hook wp_head higher priority as all other plugins/hooks
- Query String being Removed Creating a Pagination Issue within a Custom Plugin
- wp_insert_post() is returning the correct post ID, no failure, but the post content does not get updated
- Do my defines need to be unique?
- WordPress Scheduled Event Request Blocking
- How to set up VS Code for WP plugin/theme development in 2021? [closed]
- Saving an array of dynamic repeater data as post_meta
- WordPress wpform plugin submit and get multiple checked value from checkbox [closed]
- Improve page speed loading using CDN and async or defer attribute
- Script to browser problem PHP
- Store a default value for a transient on plugin activation
- wp_head function not outputting
- wp query foreach deleting record returning only first or last item
- PHP > Scheduled Tasks > Sending daily email with dynamic API variables
- WordPress Custom field Colors
- “Undefined index” error when saving empty array with checkboxes
- Correct way to enqueue page specific CSS file
- wp_insert_post: array only. wp_update_post: array|object (?)
- Is it save to use eval for a jQuery callback method coming from the database?
- Scheduling an event inside plugin class is not working
- How to make my shortcode load scripts and styles, from within the plugin?
- How to Change CSS Colors from Custom Plugin Settings Page
- Passing the name of selected color from the custom component to `render_callback`
- Any ideas why I am getting “I’m getting “wp-admin/admin-ajax.php 401 (Unauthorized)”
- Cant register rest routs from class instance
- wordpress frontend editor to add extra css to website
- Trying to enqueue script – Nothing Happens
- PHP: How to access db the right way in plugin?
- select a single val though a table in wordpress
- WordPress – Get Posts with Category data
- Add a custom WooCommerce settings tab with sections
- How to use wp_send_json() and output the value with ajax?
- Problem with inserting multiple images in gallery of each WooCommerce product programmatically
- Is it possible to access admin-ajax.php using PHP?
- Call to “admin_notices” hook from a static method
- How to Create custom block for displaying information in content section which act like shortcode
- How to detect and handle the time difference between server and user in WordPress?
- How to setup the Email piping in WordPress plugin?
- Reliable way to add nonce to HTTP Header in WordPress?
- Getting an error when my plugin is updated, but the files update correctly
- Creating a POP Alert
- ssl redirect function is not working
- Drop down question
- WordPress Plugin Development – get_option error
- how to add new PHP page in WordPress plugin
- How can I get my WordPress plugin to receive data and relay it in an ajax/php request to a remote server that requires authentication?
- custom mailchimp form using HTTP API
- Constant expression contains invalid operations plugin class properties visibility
- Gutenberg blocks shortcodes compatibility
- Save custom field on WP_List_Table
- Input field duplicates on form submit by jQuery
- not able to access $_POST on backend profile update
- WordPress Query Crashes Browser
- Unable to pass variable to database
- Gravity Forms Marketo Plugin Feed [closed]
- INCOMING: Wall of code for form and $_POST, not updating custom field’s value
- add shortcode heading showing multiple time
- WP multisite network plugin fails to see classes loaded with spl autoload
- AJAX & PHP | Call a specific PHP function from a PHP file via AJAX?
- What is this mark for “? function()” [closed]
- using a shortcode in a hyperlink
- Warning: filemtime(): stat failed for wp_
- Import js variables loaded via wp_localize_script() into js module without global scope connection
- Custom taxonomy with page post type – WordPress
- Query posts by custom taxonomy slug in WP REST API?
- oneOf JSON Schema validation not properly working for custom post meta value?
- Too few arguments at registering new templates in my plugin
- I want to lists posts in wordpress to nearest location entered by the user
- Displaying custom meta box value in a custom post page