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 to disable page delete
- How to update the delete user confirmation form?
- Get parent theme version
- In the new Theme Customizer API, how to send a value from the front back to the admin panel?
- How do I add Post Like and Bookmark Functionality to my WordPress Site?
- How to exclude certain widget from showing up on home/front page? [duplicate]
- Print shortcode in custom action hook not where the shortcode is entered
- simple expandable vertical menu, java script problem
- sanitize attachment filename
- Best way to integrate an existing PHP application into WordPress
- Add filename to attachment page url
- How do I add a new template to my site
- How to add custom page attributes in WordPress?
- How can I use a Tiny MCE editor in my custom Gutenberg block?
- 1 WordPress installation with 2 pages: every page gets a separate domain
- REQUIRED: Could not find wp_link_pages. See: wp_link_pages by Theme Checker
- problem in uploading attachment to custom directory
- Is it necessary to use Timthumb in WordPress 2.9+?
- How to show wp.me shortlink underneath each post?
- Change admin avatar only (without Gravatar or plugin)?
- How do I change the element using a custom function?
- Can readers download zip files from WordPress sites?
- Create a custom admin panel
- Translate custom template with WPML
- 404 errors when updating options in admin dashboard
- How can I resolve a .htaccess internal server error setting up a WordPress multisite?
- Product page not found if product data is set Appointment Service
- I want to embed mystream video in my wordpress site
- Current menu item highlights wrong
- Measure time in ONLY HOUR format
- Replace an URL with an new URL which has a “?” in it
- Child Theme – Changing Header
- remove or hide Link Relationship (XFN) form Menus tab
- Changing ‘Add to cart’ button text and relink for some specific products [closed]
- adding a custom time class to in theme twenty sixteen
- How do I integrate my Child Theme into a Custom Template?
- ‘str_replace’ and ‘strtr’ not working inside plugin
- SAving PHP in custom wordpress option field
- Does WordPress support template resources/custom fields
- Edit a custom admin page
- Remove Twenty Twelve themes responsiveness in Internet Explorer
- Looking for a way to take readers to random post when clicking a link
- Cannot upload to S3 using CDN Sync Tool
- Custom Import with taxonomies
- Very Simple Geo targeting
- Consolidate ‘add-to-cart’ buttons into one ‘add-all-to-cart’ button
- Update to WordPress 4.9.2, but have heavily customized theme
- Changes to code not displaying
- Has the table name in SQL for WordPress changed from WP_posts to WPCS_post?
- Multi color post title by using custom javascript inside the gutenberg editor?
- Add custom styles to the Raft theme