• Resolved James Hunt

    (@bonkerz)


    I have seen your support advice for dequeueing Ultimate Member on pages from here – https://docs.ultimatemember.com/article/1490-how-to-remove-css-and-js-on-non-um-pages

    This almost works, but there are still remnants of the Ultimate Member plugin on other pages.

    In wp_head():

    <style type="text/css">
    			.um_request_name {
    				display: none !important;
    			}
    		</style>

    In the footer():

    <div id="um_upload_single" style="display:none"></div>

    <div id="um_view_photo" style="display:none">
    
    	<a href="javascript:void(0);" data-action="um_remove_modal" class="um-modal-close" aria-label="Close view photo modal">
    		<i class="um-faicon-times"></i>
    	</a>
    
    	<div class="um-modal-body photo">
    		<div class="um-modal-photo"></div>
    	</div>
    
    </div>

    and

    <script type="text/javascript">
    			jQuery( window ).on( 'load', function() {
    				jQuery('input[name="um_request"]').val('');
    			});
    		</script>

    The href="javascript:void(0);" is important to remove as this is heavily affecting a sites LightHouse 6 score as it is an anti pattern.

    Can you please advise how to remove this additional code?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @bonkerz

    Sorry for the late response.

    Were you able to locate the following? they seem not added to the UM core. Do you have UM extensions installed?

    <style type="text/css">
    			.um_request_name {
    				display: none !important;
    			}
    		</style>

    and

    <script type="text/javascript">
    			jQuery( window ).on( 'load', function() {
    				jQuery('input[name="um_request"]').val('');
    			});
    		</script>
    

    For <div id="um_upload_single"> and <div id="um_view_photo">, you can override it via your Theme.

    The files are located in
    /wp-content/plugins/ultimate-member/templates/modal/um_upload_single.php
    /wp-content/plugins/ultimate-member/templates/modal/um_view_photo.php

    Here’s how you can override the templates: https://docs.ultimatemember.com/article/1516-templates-map

    Feel free to re-open this thread if there’s any question that may come up. Just change the topic to “Not Resolved” so we can get back to your topic.

    Regards,

    Thread Starter James Hunt

    (@bonkerz)

    Were you able to locate the following? they seem not added to the UM core. Do you have UM extensions installed?

    No still have not fixed. The only extension we use is Ultimate Member – reCAPTCHA and this is also by your team.

    For <div id=”um_upload_single”> and <div id=”um_view_photo”>, you can override it via your Theme.

    Why would overriding a theme file stop these being loaded on every single page of the website? Doesn’t make a lot of sense. Why would I override something I am happy with? I just want to stop them loading erroneous data on every single page of my site (as UM is only used in one small places). Is this possible? Can you explain to me why overriding the files (with the same file) would do anything?

    Thanks!

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @bonkerz

    I suggested to override it so you will have the ability to remove those lines that you don’t want in your header and footer.

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @bonkerz

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??

    Regards,

    Thread Starter James Hunt

    (@bonkerz)

    So, anyone from UM able to help with removing this line?

    <a href="javascript:void(0);" data-action="um_remove_modal" class="um-modal-close" aria-label="Close view photo modal">
    		<i class="um-faicon-times"></i>
    	</a>

    It’s added by line 14 of includes/admin/assets/js/um-admin-modal.js

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Dequeue Ultimate Member still leaving UM assets in page’ is closed to new replies.