Try running two seperate functions with an incremental priority..
function my_enqueue_style_one() {
wp_register_style( 'style1', get_template_directory_uri() . '/style1.css' );
wp_enqueue_style( 'style1' );
}
add_action( 'wp_enqueue_scripts', 'my_enqueue_style_one', 10 );
function my_enqueue_style_two() {
wp_register_style( 'style2', get_stylesheet_directory_uri() . '/style2.css' );
wp_enqueue_style( 'style2' );
}
add_action( 'wp_enqueue_scripts', 'my_enqueue_style_two', 20 );
also try registering the stylesheets prior to enqueuing them for additional control… like conditionally testing to see if they re already enqueued.
if ( ! wp_style_is( 'style1', 'enqueued') ) { ... }
Related Posts:
- How can error pages be customized
- How to *remove* a parent theme page template from a child theme?
- How do I make my child theme re-apply the settings that were customised when its parent was active?
- Why do I get the timeout warning?
- How to Add Customizer Setting in Child Theme
- Post format selector in Thematic child theme post class
- get_terms return errors
- Create a customizable child theme
- What is causing this error? “Warning: Invalid argument”
- Style reset password page? /wp-login.php?action=rp
- How can I & how do I change text displayed in comment via child theme
- How to build a child theme from a react-based parent theme?
- Include user defined styles without including wp-load
- Customizing default Mediaelement player
- Fatal error in wp-admin/customize.php after fresh install due to null $wp_customize
- Child Theme – how to add new widget on a specific place?
- How do I call in a category title on a category page in a child theme?
- Is it possible to add a ribbon in the background of h1 on every page?
- Include custom JS without child theme
- Child Theme with multiple css files
- How do I remove a customiser option from a parent theme in a child theme?
- CSS Styling a specific page
- Page content dissapears after loading the page [closed]
- Is there a way to override require_once of the main theme on the child theme?
- Load File (Function & Variable Value) from Child Theme
- Changes in my child theme from customizer not appearing in style.css?
- str_replace inside specific css files [closed]
- Is there another way to customize a parent template file besides adding the file to a child theme?
- css media query question [closed]
- How to customize the WordPress 2014 theme, to have page using less horizontal margin?
- WordPress Child Theme Stylesheet being loaded before Parent’s minified .css
- How to add functionality to an existing theme (using child themes)
- Changing update message from Newspaper child theme
- javascript file not working in a plugin template file
- Easily add custom HTML outside the main container?
- Trying to customise 2011 Child Theme Background Colour
- WordPress core jquery version file not loaded?
- Issue with navigation bar in child theme
- Fixed bottom menu on mobile doesn’t work on search included in Child Theme of Storefront
- Unhook a function within a class in the child theme
- Calling get_theme_mod() of an WP_Customize_Image_Control() returns an Array, how do I correctly return the image src for my custom theme?
- If a theme will undergo major changes would it be better to clone the parent instead of writting a child theme?
- How do I move my sites to a child theme without loosing customisation?
- Why, when it comes to custom background and image, does ‘The first value registered’ win?
- Changing a setting in the wp-admin/customize.php reverts CSS styles to parent theme [closed]
- Changes in comments.php in the child theme does not show up on the site
- Word Press Theme Customiser and Child theme Function.php
- How to fix enqueue_styles error for a twenty-seventeen childtheme
- Modifying posts based on category in TwentyTwentyTwo theme
- How do I know if the custom theme is a child theme or a full-custom theme?
- How to move custom icons from parent theme to the child theme
- How to: Easily Move a WordPress Install from Development to Production?
- Is there a flowchart for WordPress loading sequence?
- Essential technical features for high-end WordPress web hosting? [closed]
- How to remove admin menu pages inserted by plugins?
- Opinions and recommendations on the best barebones base theme [closed]
- How to put logs in WordPress
- Conditionally Loading JavaScript/CSS for Shortcodes
- How to get the Date Format and Time Format settings for use in my template?
- How do I dequeue a parent theme’s CSS file?
- Add validation and error handling when saving custom fields?
- Where are Additional CSS files stored
- Best Practices for Regression Testing WordPress Websites?
- Remove wrapping div and ul from output of wp_nav_menu
- What Is The Use Of map_meta_cap Filter?
- Is it ever okay to include inline CSS in plugins?
- get post author id outside loop
- Custom Walker: how to get ID in function start_lvl
- How to add crossorigin and integrity to wp_register_style? (Font Awesome 5)
- Creative uses of WordPress [closed]
- Multiple Inputs in a Customizer Control
- New WP_Customize API – how does it work under the hood?
- Embedding a SOAP Client into a WordPress Plugin?
- Is there anything that Joomla or Drupal can do that can’t be done in WordPress? [closed]
- Update widget form after drag-and-drop (WP save bug)
- Data sanitization: Best Practices with code examples
- How to benchmark a WordPress installation? [closed]
- Should I delete the default themes?
- Moving WP install from local to live, what about wp_posts GUID?
- Modified wp.media.view.Settings.Gallery in Backbone JS, but editing doesn’t work
- Running Gutenberg React in Development Mode
- Prevent WordPress from automatically installing a new theme each year
- Can we use one WordPress installation for multiple databases, domains and content directories
- No Error Log File, no debug info
- Is there a blank theme framework compatible with WP 3.0? [closed]
- Plugin SVN & update API – how are plugins identified?
- Users with custom roles not showing in post author select box
- How to use more than 256MB of memory in the admin?
- How do register_sidebar() and get_sidebar() work together?
- How do you get formatted content of a post using the WordPress API?
- Issues enqueueing parent & child theme stylesheets with revised Codex method
- Localization: I want the backend: english and frontend in defined language
- Are there any forks of WordPress (and what is different about them)?
- How to Change 404 page title
- Make Custom Metaboxes Collapse by Default
- WordPress Paginate $wpdb->get_results
- Custom maintenance page
- Add button to TinyMCE bar without creating a plugin
- How to add a new product type on woocommerce product types? [closed]
- How to include own css on wordpress tinymce editor?