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
- Best way to overide plugin CSS?
- Get a list of all registered actions
- How can I edit post data before it is saved?
- How can I use WordPress functions in my stylesheet?
- How can I see all the actions attached to an “add_action” hook?
- Registering Class methods as hook callbacks
- How to customize woocommerce related products? [closed]
- How to include code only on specific pages?
- Changing the “Plugin Activated” Message Default
- Hooking in to plugins
- Generate dormant hook references
- Restricting a Plugin to Only Load its CSS and JS on Selected Pages?
- How do I cleanly override a plugin’s CSS with a child theme?
- Schedule WordPress Auto-Updates to only run during business hours
- Better to fire specific hooks or generic hooks with parameters?
- How to only hook on Single.php after content?
- Remove action from plugin on other plugin
- Preventing a plugin from updating
- how to include other plugins css files in a shortcode?
- How To Determine If A Filter Is Called In A Sidebar/Widget Context?
- Is there any debug toolbar that shows whick hooks are called for the current page in WordPress?
- When can you get current page ID and initialize hooks right after?
- Customizing subject in comment notification e-mails
- How to save the values of checkbox to the register setting?
- Can we hook a static method of a class to add_action inside that class?
- Edit plugin without hooks in functions.php
- How can I log a user out of WordPress before the page loads?
- How can I reduce the amount of files loaded/included per plugin?
- What is the ‘admin_action_’ . $_REQUEST[‘action’] hook used for?
- WP showing “warning: call_user_func_array()”, What to do?
- Filter out results from REST API
- How can I dequeue a Plugin Stylesheet?
- How can I remove a hooked action created by a plugin?
- WordPress admin notice in plugin function
- Using the ‘draft_to_publish’ hook (post status transition)
- Filter Hook on plugin update
- Using standard backend elements in Plugin
- Using tabs for wordpress plugin
- Enqueue style inside shortcode but its loaded at the bottom of page (before footer scripts)
- Modify featured image URL at runtime
- WordPress Hook that will run when media file deleted
- Seeking clarification on page request life-cycle
- Disallow a user to post in certain categories
- Intercepting a add_action
- Generic plugin (de)activation hook?
- Which hook should be used to validate custom form fields on the login form?
- Override CSS settings of plugins
- How can I make content disappear when a user logs in?
- Add CSS animation as Preloader to WordPress
- Best way to inject css into admin_head in plugins?
- Good tools for locating hooks in a wordpress page/admin interface/blog post?
- disable active plugins for specific theme
- Twillio How To Send SMS for Custom Post Type
- Hook (upgrader_process_complete) running moment
- wp_enqueue_style in Plugin [duplicate]
- Adding a form at the end of the content
- Hide WordPress Plugin Deactivation Links
- Quote rotator in the sidebar
- Find out if request is for custom post type archive before query runs
- Use external link in the add sub menu
- Pass A Value From Outside To A Plugin Variable
- Styles and Scripts, Selectively enqueue across entire site
- Make the css of the widget overwrite theme css
- Built in admin ajax hooks?
- Failed to invoke other hook from the init hook
- Does the ‘nav_menu_css_class’ filter accept 2 or 3 arguments?
- How can I add a custom meta value on file upload?
- Adding dynamic section to WordPress
- How can I enqueue a style only when a particular widget is active?
- WordPress Plugin Look & Feel
- Add CSS class to add-to-cart button, Woocommerce [closed]
- do_action and hook methods
- the_posts hook, which set of posts?
- How can I filter blog name?
- why does the add_action(‘the_content’) overwrite my page
- Fatal error: Class not found in
- Is it possible to add an action to the currently running action?
- How to load all plugins CSS after child theme CSS?
- woocommerce product attributes
- I need to generate the CSS for my plugin from a function, how do i map a request to a function in the front-end?
- How do I register a stylesheet inside a WordPress widget?
- Prevent CSS/JS loading when plugin is not used
- How to filter content post only on save
- Override Theme CSS with CSS from a plugin
- Filter or action hook to insert content on admin pages before tag
- Showing Notifications While Activating Plugin
- Is it possible to remove this action? (as it’s added just before it’s called)
- Styling readme.html in plugin?
- Unable to load stylesheets and scripts to plugin settings page
- Layout shop page: resize images and columns
- plugin_action_links_{$plugin_file} hook not in the main plugin file
- OOP: Display warning and deactivate the plugin if PHP version is less than 5.4
- Over write plugin templates
- Woocommerce Shipping module available only for type of products [closed]
- How to find out what blocks are added by a plugin
- WordPress Plugin Boilerplate – add_action hook in static “activate” function
- Determine plugin name from within plugin_action_links filter