redirect after clicking avatar

Home Forums Legacy Support Support queries Setup issues redirect after clicking avatar

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #226094
    MeesterGijs
    Spectator
    Hello, me again :) Is there a way when users click the image of the avatar. This one. That they get redirected to this url: https://meestergijs.nl/studenten/username/profile/change-avatar/? And as you see in the screenshot. Is it also possible to add the username next to the avatar?
    #226158
    logan
    Member
    Hello, please add this code in your customizer plugin: add_action('bp_before_member_header','logan_plz_redirect_onClickAvatar_changeAvatar' ); function logan_plz_redirect_onClickAvatar_changeAvatar() { $location = bp_core_get_user_domain( bp_loggedin_user_id() ).'profile/change-avatar/'; ?> <script> $(function(){$('.bp-user div#item-header div#item-header-avatar>a').attr("href", "<?php echo $location; ?>"); }); </script> <?php } refer: https://cl.ly/5d49e2
    goto wp-admin >> wplms >> buddypress >> enable meta info. if it does not work then share url and credentials i will check.
    #226188
    MeesterGijs
    Spectator
    enable meta info. You mean this one? https://imgur.com/a/P66fEfr And it didn't work the first time. I brought me to the first tab of the profile page. But any time after that (on which ever page in the profile I was, it did work. So thanks!!
    #226349
    logan
    Member
    Hello, you could try this code:

    add_action('bp_before_member_header','logan_plz_redirect_onClickAvatar_changeAvatar' );

    function logan_plz_redirect_onClickAvatar_changeAvatar() {

    $location = bp_core_get_user_domain( bp_loggedin_user_id() ).'profile/change-avatar/';

    ?>

    <script>

    $(function(){$('div#item-header div#item-header-avatar>a').attr("href", "<?php echo $location; ?>");

    });

    </script>

    <?php

    }

    i have removed this: http://prntscr.com/p78hph this will work for all pages.
    enable meta info. You mean this one? https://imgur.com/a/P66fEfr yes this. else i can share a custom code to print the custom details of the user.
    #226721
    MeesterGijs
    Spectator
    Enabling the meta data does effect the page.You didn't tell. it now shows me this: https://imgur.com/a/ViDy7t1   But that's ok if I can at least make the username much bigger and lower the font-weight. And perhaps have the sentence about activity underneath the username. Or else delete it.
    #226934
    logan
    Member
    Hello, use this: .bp-user div#item-header-content { display: grid !important; }   .bp-user div#item-header-content h3 { display: block !important; font-size: 25px;} } refer: http://prntscr.com/p8nblo
    #227026
    MeesterGijs
    Spectator
    I can't get to the customizer, as discussed in other ticket. I know I can get there using filezilla (ftp) but is there another way in admin to get to customizer. Also, because I still have code in the customizer 'white box'.
    #227046
    MeesterGijs
    Spectator
    But, I've added in ftp. Looks great! You can close this topic.
    #227102
    logan
    Member
    thank you so much.
Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘redirect after clicking avatar’ is closed to new replies.