• Resolved Aditya Agarwal

    (@adityamilyin)


    Google’s Lighthouse cuts by 9 points in almost every single url, because a URL is uncrawlable.

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

    This is inserted by Ultimate Member on all pages.

    I get it, it must solve some purpose, but for me, it’s absolute nightmare.

    I need some guidance over how to edit and make it complaint with Lighthouse.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Aditya Agarwal

    (@adityamilyin)

    I found the following solution from another wordpress support page Uncrawlable Link from UM on every page of website

    Problem is it solves the issue for all pages except user page. And for a personal like me, whose site has 500 users, it means 500 urls still have content that is uncrawlable.

    Please support and provide us with a real solution for a real problem and mend it in future version of UM.

    I have been UM customer since 3rd May 2018, and noticed this error for the first time yesterday, Imagine how many people would be their who wouldn’t even notice and never even try to fix this issue.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @adityamilyin

    You can copy the template ultimate-member/templates/modal/um_view_photo.php and then modify the copy with your preferred attributes with the anchor and then remove the existing template with the code below.

    add_action("template_redirect", function(){
       remove_action( 'wp_footer', array( UM()->modal(), 'load_modal_content' 
    });

    And if you don’t want to display this um_view_photo template for non-logged-in user, just use the following:

    add_action("template_redirect", function(){
        if( ! is_user_logged_in() ){
            remove_action( 'wp_footer', array( UM()->modal(), 'load_modal_content' ), 9 );
        }
    });

    Regards,

    Thread Starter Aditya Agarwal

    (@adityamilyin)

    Great.

    Thanks for the snippet to remove actions for modal, however I would prefer to solve the error rather than just hide it for logged out users.

    I tried to copy and paste the file, to /wp-content/themes/milyin/ultimate-member/templates/ and changes made weren’t shown on frontend.

    I tried to copy and paste the file to /wp-content/themes/milyin/ultimate-member/templates/modal/ changes made there weren’t shown either.

    Please inform me the correct directory,

    Also suggest the changes that need to be made to the template to achieve the desired results in Lighthouse.

    Thanks in Advance

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @adityamilyin

    You need to include a copy of the template file that has changes to match your desired result. You will need to customize it on your end.

    Just include the template like this( it depends where you locate the copy of the template ):

    add_action( 'wp_footer', function(){
       include_once "path/wp-content/themes/your-theme/ultimate-member/modal/um_view_photo.php"
    });

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @adityamilyin

    Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. ??

    Regards,

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Ultimate Member Reducing Lighthouse Score Links are not crawlable’ is closed to new replies.