Leanne Romak
asked 10 years ago

The avatar currently links to home and pops to the top of the page. http://squarewavestudio.com

1 Answers
Wilfred
answered 10 years ago

Hi Leanne, 
To resolve this issue please follow my instruction here:
1. Open shortcodes.php file in your site/wp-content /themes/your theme /inc/shortcodes.php
2. Replace the following code form line 558 to line 562 

if ($user->user_url != '') {
$userUrl = $user->user_url;
} else {
$userUrl = '#';
}

with:

if ($user->user_email != '') {
$userUrl = $user->user_email;
} else {
$userUrl = '#';
}

3. Replace the following code – line 568 

$avatar = !empty($avatar) ? '<a href="'.$userUrl.'"><img src="'.$avatar.'" alt=""></a>' : '<a class="no-avatar" href="'.$userUrl.'"><img class="no-avatar" src="http://placehold.it/240x180/f9f9f9&text=no+avatar"></a>';

with: 

$avatar = !empty($avatar) ? '<a href="mailto:'.$userUrl.'"><img src="'.$avatar.'" alt=""></a>' : '<a class="no-avatar" href="mailto:'.$userUrl.'"><img class="no-avatar" src="http://placehold.it/240x180/f9f9f9&text=no+avatar"></a>';

Hope this helps!

Powered by DW Question & Answer Pro