Home › Forums › Legacy Support › Support queries › Setup issues › redirect after clicking avatar
- This topic has 8 replies, 2 voices, and was last updated 4 years, 7 months ago by logan.
Viewing 9 posts - 1 through 9 (of 9 total)
-
AuthorPosts
-
September 16, 2019 at 9:11 am #226094MeesterGijsSpectatorHello, 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?September 16, 2019 at 12:54 pm #226158loganMemberHello, 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.September 16, 2019 at 2:38 pm #226188MeesterGijsSpectatorenable 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!!September 17, 2019 at 11:50 am #226349loganMemberHello, 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.September 19, 2019 at 8:11 am #226721MeesterGijsSpectatorEnabling 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.September 20, 2019 at 10:55 am #226934loganMemberHello, 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/p8nbloSeptember 20, 2019 at 1:55 pm #227026MeesterGijsSpectatorI 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'.September 20, 2019 at 5:43 pm #227046MeesterGijsSpectatorBut, I've added in ftp. Looks great! You can close this topic.September 21, 2019 at 7:50 am #227102loganMemberthank you so much. -
AuthorPosts
Viewing 9 posts - 1 through 9 (of 9 total)
- The topic ‘redirect after clicking avatar’ is closed to new replies.