get_stylesheet_uri()
loads the main stylesheet of the theme. If you need to load additional stylesheets, you need to use get_template_directory_uri()
for parent themes and get_stylesheet_directory_uri()
for child themes.
If you have stylesheet called custom.css
in the root in a child theme, you will use get_stylesheet_directory_uri()' . /custom.css'
You should also make sure that you have wp_head()
inside your <head></head>
tags in your header
Related Posts:
- How to load scripts/styles specific for a page
- Dequeue Scripts and Style for Mobile not working?
- Enqueue script o style only if a template part is loaded
- How to load script-related styles automatically?
- If is multiple page templates
- Passing arguments to my function with do_action and add_action is not working
- Enqueue scripts not working with if is page conditional tag in functions.php
- Why won’t my scripts load?
- Only let plugin add actions to wp_head & wp_footer on single posts
- enqueue styles for only mobile wp
- jQuery does not work
- Why does get_template_directory_uri() not include “www”, only for enqueued stylesheets?
- Theme JS is available but theme CSS isn’t
- wp_enqueue_script() not working
- How to use wp_enqueue_script properly?
- Advanced method to control cache of enqueued style/script
- Add custom css file after plugin css with WordPress Child Theme functions.php
- wp enqueue style on about us page
- Test CDN link from function.php or wp_enqueue_script/style?
- How do I dequeue a Stylesheet, stored in an ‘Assets’ folder?
- I need to ‘wp_dequeue_script’ and ‘styles’ and ADD a bunch of other css and js
- True parameter but jquery register in header and not in the footer with wp_register_script
- Why is style.css not loading through the functions.php
- custom post with loading script per single post
- using enqueue_script in a shortcode isn’t working
- Auto updating JavaScript dependancy in functions.php
- Loading newest dependency javascript module file in functions.php
- How can I get a list of all enqueued scripts and styles?
- Trying to use add_action and do_action with parameters
- How to use the do_action () with parameter
- Perform an action when post is updated/published
- Get list of scripts / styles and show file which enqueued them
- Do WordPress’ cron’s clean up expired transients?
- deregister scripts on certain page
- How to count number of functions attached to an action hook?
- How can I tell if I’m on a login page? [duplicate]
- Using get_terms for custom taxonomy in functions.php
- Fatal error: Call to undefined function add_action() – an untouched problem
- Reuse variable in hook callback
- Automatically Add Specified Value to Attachment Metadata upon Upload
- Can’t Update function.php after writing short code
- How to update feed only 2-3 times a week (for Feedburner email)?
- wp_enqueue_script add integrity parameter
- When using wp_enqueue_script(); in a theme why don’t we use add_action?
- WP CLI Get all Enqueued Scripts and Styles
- Register vendor JS/CSS only on pages that require them?
- functions.php How to add css/js depending on Template Name?
- Register and load scripts
- Which action does wp_update_user triggers?
- How can I get my Script to work on the Login page?
- Trigger a custom function when option are saved in admin area
- Redirect to another page if the user is logged in when pressing again the login button on menu bar
- Attempt to change jQuery version caused White Screen of Death
- Difference b/w Simple function call & do_action call
- different style sheet for just one page template
- Override the WordPress core function wp_referer_field
- Set Taxonomy based on post status
- add_action template_redirect not working for home page
- AMP – Change rel=”canonical” from functions.php [closed]
- Why is my css and js not enqueued until footer?
- Some questions about how proper add 2 CSS file in a WordPress theme?
- Enqueue script on every page except one
- current_user_can comma list vs OR (||) list
- How to: Conditionally Enqueue JS and Stylesheets, for Custom Post Type (Single and Archive Templates)
- Add back in child theme what the parent theme removed with remove_action
- Load JS file only in specific template
- login_headertitle is deprecated since version 5.2.0
- 400 Bad Request – JavaScript App calling Custom wp-json endpoint
- 404 when enqueue_script using plugin_url
- Changing where my author box is printed
- Do we need to change our child function.php to require/include child dir files when we add an over-riding file.php into the child theme
- Use add_action within template
- video.js not enqueueing?
- Problem with custom function when I go back with the browser
- Page Template Won’t Load Correct CSS File
- Replace admin header logo with an image
- Enqueueing a code block from an options framework
- is there a way to get all queued scripts/styles into a template without `get_header()`?
- Fatal error: allowed memory size when after using enqueue_script
- template_redirect action only firing if logged in
- Get webpack to work on child theme
- How to load a css file depending on the current role
- Issue passing action class to nested function. Admin Columns
- If has action not working as expected
- Is_Page doesnt detect my page
- How do you insert code into the sidebar?
- How Do I Unhook This Parent Theme Function?
- Stylesheet does not load despite functions.php
- Why can I not deregister my style and script on custom post type?
- How to make the RTL.css the dominant css code?
- How to show only specific category post by user role without plugin and restrict all other cats
- Unable to declare AOS library in functions
- WP Enqueue Script Error
- Which method is more correct for removing WooCommerce Extensions menu item?
- Javascript and Stylesheet in child page
- WordPress Jquery+scripts enqueue issue
- custom COOKIE on custom page
- Settings in functions.php used by a plugin
- Using array page name together with page id to deregister script
- Remove snippets of JS from core