Stylesheet load order after child theme styles
-
Hi
I have been trying to edit some styles for my UM site and I was having issues doing so as some items in the UM style sheets have !important and since the stylesheet that is causing the issue (um-members.css) loads after my child theme stylesheet it takes priority.
I have (or thought I had) set my theme stylesheet to load last using a function in my functions.php file, for example (mytheme and some-theme used for example here only), which works for every other stylesheet;
/** * Enqueue styles */ function child_enqueue_styles() { wp_enqueue_style( 'mytheme-theme-css', get_stylesheet_directory_uri() . '/style.css', array('some-theme-css'), CHILD_THEME_MYTHEME_VERSION, 'all' ); } add_action( 'wp_enqueue_scripts', 'child_enqueue_styles', 999 );
Now all the UM stylesheets do load before my child theme except for
<link rel='stylesheet' id='um_ui-css' href='https://mysite.com/wp-content/plugins/ultimate-member/assets/css/jquery-ui.css' media='all' /> <link rel='stylesheet' id='um_members-css' href='https://mysite.com/wp-content/plugins/ultimate-member/assets/css/um-members.css' media='all' />
Where both of these load after and at the bottom of the site code. It is mainly the um-members.css file i need loaded before my child theme styles.
Any help appreciated
- The topic ‘Stylesheet load order after child theme styles’ is closed to new replies.