Skip to content

Instantly share code, notes, and snippets.

@yuriinalivaiko
Created January 22, 2026 18:48
Show Gist options
  • Select an option

  • Save yuriinalivaiko/4b2aca3b8f7a1e43a89a3b8e658b78b6 to your computer and use it in GitHub Desktop.

Select an option

Save yuriinalivaiko/4b2aca3b8f7a1e43a89a3b8e658b78b6 to your computer and use it in GitHub Desktop.
Ultimate Member customization. A solution to fix loading styles in the Impreza theme.
<?php
/**
* Some versions of the Impreza theme can not load styles in the footer.
* Use this code to force load Ultimate Member styles in the header.
*/
function um_enqueue_style_in_header() {
$um_styles = array(
'um_old_css',
'um_default_css',
'um_styles',
'um_account',
'um_common',
'um_confirm',
'um_crop',
'um_datetime',
'um_datetime_date',
'um_datetime_time',
'um_fileupload',
'um_fontawesome',
'um_members',
'um_misc',
'um_modal',
'um_profile',
'um_raty',
'um_responsive',
'um_tipsy',
'um_ui',
'select2',
);
foreach ( $um_styles as $um_style ) {
if ( wp_style_is( $um_style, 'registered' ) ) {
wp_enqueue_style( $um_style );
}
}
}
add_action( 'wp_enqueue_scripts', 'um_enqueue_style_in_header', 200 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment