-
How do I show larger badges just in the profile view and keep the same sizes in the card?
I’m seeing all badges are style by 1 class: need more control over this to customize… I’ve created larger icons but when I adjust the css it’s globally changes the size in the card as well… thanks
/* add custom badges */
add_filter(‘userpro_show_badges’, ‘userpro_badges_show’);
function userpro_badges_show($user_id){
global $userpro_badges;
$output = null;/* Find user badges (get_user_meta – _userpro_badges) */
$get_badges = $userpro_badges->get_badges($user_id);
if (is_array($get_badges)){
foreach($get_badges as $key => $badge) {
if (isset($badge[‘badge_url’])) {
$output .= ‘‘;
}
}
}return $output;
}
The badges are adjusted by this class by default
PHP1234567891011img.userpro-profile-badge {margin: 0 2px !important;top: 0 !important;vertical-align: middle !important;box-shadow: none !important;padding: 0 !important;max-width: 16px !important;max-height: 16px !important;position: relative !important;display: inline !important;}Change the max-width and max-height and create specific badge width/height based on parent element if you know css. 🙂 That way you get larger badges to appear.
You must be logged in to reply to this topic.