I want to change link for avatar photo on the profile page from profile to "Change photo" page
Hello,
Please refer this tutorial:
https://wplms.io/support/knowledge-base/customise-profile-menu-dropdown-wplms-2-6/
Tip: For better support always share a screenshot:
Please provide proper screenshot, use
https://prnt.sc/ to upload and share url of the screenshot.
If you want to send us a video of the issue, use
https://screencast-o-matic.com/ to upload and share url of the video.
This reply has been marked as private.
Hi
twumj01,
Please share valid credentials. The credentials given by you is showing invalid.
Please mark as private reply while sharing the credentials.
Waiting for quick response.
This reply has been marked as private.
Hello,
Yes that in possible by custom codes.
Please paste this snippets in your wp-admin >> plugins >> editor >> wplms-customizer plugin >> wplms-customizer.php
add_action('wp_footer','redirectAfterAvatarClick',999 );
function redirectAfterAvatarClick() {
$home_url = get_home_url();
$username = bp_core_get_username(bp_loggedin_user_id());
$location = $home_url.'/members/'.$username.'/profile/change-avatar/';
?>
<script>
jQuery(document).ready(function($){
$("div#buddypress .member_header div#item-header-avatar>a").attr("href", "<?php echo $location; ?>");
});
</script>
<?php
}
it will change the url to the change profile image.
I have tried it but it didnt work
Hello,
Yes it was not working because the classes were changing on your website.
Now i have fixed this on your website here:
http://prntscr.com/negoce
Check the changes i have made:
https://cl.ly/8064a6
updated code is this:
add_action('wp_footer','redirectAfterAvatarClick',999 );
function redirectAfterAvatarClick() {
$home_url = get_home_url();
$username = bp_core_get_username(bp_loggedin_user_id());
$location = $home_url.'/members/'.$username.'/profile/change-avatar/';
?>
<script>
jQuery(document).ready(function($){
$("div#buddypress div#item-header div#item-header-avatar a").attr("href", "<?php echo $location; ?>");
});
</script>
<?php
}
Dear Friend,
Glad you’re enjoying the theme & support – thanks for using it!
Please write your review. I would really appreciate that!
Here: https://themeforest.net/item/wplms-learning-management-system/reviews/6780226
If I can be of assistance, please do not hesitate to contact me again.
Closing this topic.