Created
January 22, 2026 18:48
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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