emdizzle
Forum Replies Created
-
@norm1 – your post and code was SUPER helpful.
Here is the process I used to get a css file I can edit:
Example: I want to edit um-styles.css,
1) I ran Norm’s dequeue code for that file,
$um_priority = apply_filters( ‘um_core_enqueue_priority’, 100 );
add_action( ‘wp_enqueue_scripts’, ‘gbfl_dequeue_um_scripts’, $um_priority + 1);
function gbfl_dequeue_um_scripts() {wp_dequeue_style(‘um_styles’);
}
Then:
2) created a new file in my theme child folder (new-um-style.css)
3) copied the script from um-style.css and pasted it into new-um-style.css (to then edit as much as I want)
4) then I added this code after Norm’s code in the child functions.php file:function enqueue_my_custom_style_for_UM(){
wp_enqueue_style(‘um_styles’, get_stylesheet_uri(), array( ‘reset’ ) );
wp_enqueue_style( ‘reset’, get_stylesheet_directory_uri() . ‘/new-um-styles.css’);}
add_action(‘wp_enqueue_scripts’, ‘enqueue_my_custom_style_for_UM’);
This worked and got the website looking as before! Now I can go into my new-um-styles.css and change things around.
It sucks that the css files are all over the place, so I will need to do this with likely all the ones Norm originally listed, but to keep the instructions clear here, I just used the one file.
I hope this helps others out!!!