Create a theme’s style.css
as normal but just include the header information. This will be a config file only.
The register and enqueue your stylesheet(s). You can use any path you’d like. I think this is what you need:
function register_theme_styles() {
wp_register_style( 'theme-styles', site_url( '/css/site.css' ) );
wp_enqueue_style( 'theme-styles' );
}
add_action( 'wp_enqueue_scripts', 'register_theme_styles' );
Related Posts:
- Making a
- CSS to make HTML page footer stay at bottom of the page with a minimum height, but not overlap the page
- What is the difference between the selectors “.class.class” and “.class .class”?
- How can I replace text with CSS?
- Bootstrap 4, How do I center-align a button?
- How do I horizontally center a span element inside a div
- Is background-color:none valid CSS?
- Text not wrapping inside a div element
- How to make padding:auto work in CSS?
- How to vertically center inside the parent element with CSS?
- CSS Outside Border
- CSS not working in Chrome
- Pure CSS to make font-size responsive based on dynamic amount of characters
- CSS – display: none; not working
- Adding border to CSS triangle [duplicate]
- How to enqueue style before style.css
- wp_enqueue_scripts, wp_register_scripts, wp_print_scripts: i’m confused
- Which Details Are Required For Style.css File Header?
- How to implement different color schemes in your themes
- WordPress Register Style Called Incorrectly
- wp_enqueue_script + how to load JS or CSS in one URL merge call?
- How to target first img in every wordpress post with CSS [closed]
- How to change Parent Themes in Child Theme CSS
- hSite has no css on mobile [closed]
- How to dequeue styles coming from plugins?
- How to set different font family based on text language?
- Relative path in wp_register_style not working
- Is there a filter for editor-style.css file?
- Custom CSS class or ID on menu items that have a Submenu
- How to insert html/css/javascript code to wordpress plugin
- Different ways to load child theme css
- Can you edit WP gutenberg block css without a plugin?
- Style internal links based on the tags of the linked post
- How to override Bootstrap css with my child theme css in wordpress?
- How to stop Gutenberg from outputting inline CSS for specific blocks?
- Pure CSS to “float” to the right the number of children of an admin_bar child node
- “Scattered” gallery
- WordPress adding inline style can’t remove it
- How to enable table overflow scroll? (especially order list table)
- Trying to figure out why my child theme is trying to access a file that doesn’t exist
- Change background color of subpages
- How to edit the default icon of Add Media button?
- Hide Image On WordPress On Single Page [closed]
- Faster fonts on mobile
- Reduce white space in twenty fourteen
- How to make WordPress using local CSS/Fonts/Scripts only
- Ordering stylesheet above using functions.php
- How to know which order WordPress places CSS files?
- How to remove parent style.css from the header
- How to remove the gap on right side of webpage (using Bootstrap with WordPress)?
- WordPress CSS problems with controls
- Remove CSS & JS from
- Show class from css in format dropdown
- All of my custom Bootstrap styles are not working in my child theme!
- Aligning line made with CSS [closed]
- With over a page of content the footer remains where the bottom of the screen was at top scroll
- Overwriting forced wordpress CSS styles [closed]
- CSS is not loaded on mobile devices
- How to add/insert a class to a sidebar in single.php?
- Customizing WP-syntax to get custom colors
- Sidebar missing from Homepage
- W3TotalCache and Javascript — what should go where, when?
- CSS not being applied
- 2 css files? Theme css file gets override by another css file that I can not edit
- WordPress sidebar content moving to bottom of page
- How to insert the current user’s role into the body class in the admin backend
- custom template display 3 columns
- Need to make sidebar responsive only when screen width is greater than 1024px
- Does anyone know how to make text fade in when scrolling down, that doesn’t require any plug-ins? [duplicate]
- Blog page and the Home page showing the same content
- I have text on a banner on my wordpress site and I am unable to get rid of it? Would appreciate any help or advice :-)
- How to change specific menu tab from left to right in My Home Theme?
- WP Admin Bar transparent on some pages (.screen-reader-shortcut)
- Admin bar default color scheme for nonregistered/nonlogged users
- Lines of CSS only being delivered while logged in
- How to Compress Css/js code in wordpress and increase loading speed?
- How to Take Logo Out of Navigation Menu? [closed]
- @media applying globally and not separately for each screen width [closed]
- Make different border color gallery items
- How remove the white space between my menu and slider?
- WordPress site using unknown overriding css
- Move both sidebars more to their sides [closed]
- Header formatting works for safari but not chrome @media screen size technique on iphone
- Style Switching
- Adding a css style to the main nav menu in child pages
- Adding custom css to a theme depending on whether the admin user is logged in or not
- Adjusting post width according to the image size
- Theme looks ugly – FOUC – stylesheets loaded in footer
- Background tiles not working in iPad2 but ok everywhere else
- To override CSS of parent theme
- How to target only one element if more elements share the same CSS class
- Can’t override CSS with child theme
- [class*=”content”]:before css styles in TwentyThirteen [closed]
- remove white overlay [closed]
- Why doesn’t media(max-width) work on h2 title?
- How to use WordPress 3.8 back-end CSS in front-end?
- Enqueue MCE Editor CSS in admin page
- WordPress site suddenly not showing some DOM elements but mobile is fine
- Editing size of h3 tag in wordpress on a one-off basis
- Content doesn’t fit on large size desktops like 2560×1440