-
I see another user andy999 has had the same issue with author.php I used:
add_filter(‘userpro_user_profile_url’, ‘userpro_author_url’, 99, 2);
function userpro_author_url($link, $user_id) {
return get_author_posts_url( $user_id );
}
Great that works perfect but the issue same as andy999 mentioned too is that if user has 0 post it will not show the correct userpro profile on author.php … but this only happens when I register with userpro if I register with the themes default registration with userpro deactivated user will be correct on author.php even with 0 post.1. is there a way to disable userpro registration (this should be an option)
2. or is there a fix for this to follow theme’s default way of registrationTHIS IS HOW THE THEME PULLS THE DEFAULT USER PROFILE EVEN WITH 0 POST IT SHOWS CORRECT USER PROFILE
<?php
get_header();
$auth = (isset($_GET[‘author_name’])) ? get_user_by(‘slug’, $author_name) : get_userdata(intval($author));
$bg = get_user_meta($auth->ID, ‘_cover’, true);
if($bg == ”) {
$bg = get_template_directory_uri() . ‘/img/user-cover.jpg’;
}
$kudos = teo_get_kudos($auth->ID);
?>
<?php echo teo_get_avatar($current_user->ID, 90, 90);?>
class=”user-name”><?php echo $auth->display_name;?>
<?php echo $kudos . ‘ ‘; _e(‘kudos’, ‘Aruna’);?>HOPE THAT HELPS!
You must be logged in to reply to this topic.