First thing to mention is that you don’t need to use wp_register_style
if enqueuing within the same function. You can replace it with wp_enqueue_style
and remove the duplicate.
As for why your stylesheet isn’t loading, start by checking the file path. Try this instead:
wp_enqueue_style('cl-chanimal-styles', plugin_dir_url( __FILE__ ) . 'css/cl-chanimal-styles.css' );
https://codex.wordpress.org/Function_Reference/plugin_dir_url
Related Posts:
- Is there an earlier hook than login_head or login_enqueue_scripts?
- Combining several CSS files into one for optimization
- Passing a parameter to filter and action functions
- Get a list of all registered actions
- How can I use WordPress functions in my stylesheet?
- Preventing a plugin from updating
- Using standard backend elements in Plugin
- WordPress Hook that will run when media file deleted
- Disallow a user to post in certain categories
- Override CSS settings of plugins
- Adding a form at the end of the content
- How can I add a custom meta value on file upload?
- How can I enqueue a style only when a particular widget is active?
- How can I filter blog name?
- why does the add_action(‘the_content’) overwrite my page
- Fatal error: Class not found in
- Showing Notifications While Activating Plugin
- Woocommerce Shipping module available only for type of products [closed]
- WordPress Plugin Boilerplate – add_action hook in static “activate” function
- Put code into body tags near top, using a plugin
- wp_enqueue_style specifics for overwriting plugin styles
- Hook before & after plugin / core update
- publish_post plugin hook doesn’t always pass $post->post_content
- get_plugins() doesn’t work after plugins_loaded
- add_action in functions.php, do_action in plugin?
- add action for displaying posts using a shortcode
- Randomize attachment IDs
- Are there hooks for WordPress updates?
- Pass info from functions.php to plugin
- Plugin activation hook in an abstract class
- Add stylesheets and js to template files when shortcode is used
- Change permalink structure hidden button edit
- WordPress filter that hook after each action/filter hook
- When to use action hooks and plugins
- Gravity Forms plugin: How to use “gform_editor_js” action hook? [closed]
- CSS from textarea in options page to frontend what to do
- custom changes removed after plugin update
- Map a custom id to wordpress post id
- Calling plugin function inside custom plugin for onclick event
- get current date + 90 days and checking every day
- How to create an input field, and base the output on spreadsheet data? [closed]
- How to get post ID with hooks publish_post, new_to_publish, etc
- How to use my menu PHP code as sidebar?
- Add sub menu page in your plugin
- how to change automatic placing of social plugins below content?
- Full list of registered scripts or styles, but from an admin options page
- Deactivate JS Script in Plugin Shortcode
- Plugin Development – Functions or Hooks?
- Making that Admin Bar transparent or a blue color
- Adding Plugin Assets to Header
- Skewed / slanted button within elementor [closed]
- plugin dev – minimum base css specificity?
- What are admin hooks
- get specific value of a array | PHP
- How do I add $_SESSION[”] to my wordpress page?
- How to use filter to disable adding a product to wishlist?
- Historical customisations won’t go away [closed]
- WordPress: Add custom add_filter for custom functions
- Function added to hook “new_to_publish” not executing – custom plugin
- change or add css to theme from plugin
- At a Loss on over Page Peel Plugin Customization [closed]
- Blocking Plugin Css to load custom in template directory
- Hook for plugin to insert into entry-meta
- uncaught TypeError: Cannot read properties of null (reading ‘classList’) custom plugin
- How do I minify a plugins CSS/JS code?
- Use a hook or filter, or overwrite this Gamipress function?
- Hook from plugin doesn’t fire up from external PHP script
- Is there a hook similar to “save_post” which only fires AFTER the post is completely published?
- How to remove Unused CSS From a WordPress Theme?
- Randomize post (and page) IDs on generation
- Is there any known plugins that would replace WordPress classes in editor with their Bootstrap 4 equivalent?
- save_post hook partly firing in update post
- Changing the CSS with a plugin
- how to change a static testimonials into dynamic
- Show post object of any page in frontend
- Use action, filter, or hook to append HTML to WordPress plugin function
- Passing function into add_action always returns the first argument
- Hook to display element as product on category page
- Is it possible to disable a theme programmatically?
- Speeding up WordPress on a Local Network
- Edit the stylesheet of a child theme
- How do I override WordPress plugin css [closed]
- WP Plugin CSS not being applied to page
- Customize CSS for “Swipebox ” lightbox
- plugin not hooking to my custom hook
- wp_login_form() ignoring login_form action hook
- Best use adding user generated JS/CSS to a theme with a plugin
- Modify a plugin’s content
- Child Theme Changes Are Not Reflecting In Parent Theme
- Plugin hook breaks new WP 4.0 media library grid view?
- How to set up php,javascript and css to allow for our finished product to be displayed within a page?
- Variable scope in plugin outside loop [closed]
- How to add different CSS for galleries
- Checking url from plugin [duplicate]
- MultiPostThumbnails and media queries
- WordPress Hooks : Where to place callbacks that repetitively yield the same effect?
- Woocommerce Product Page Collapsible Box Using CSS
- How to Add Extra Text In WordPress Title Before Post Publish
- Why is my activator class adding the files/running the actions I add?
- Admin Notice is only localized when displaying the “Plugins” Backend Page