Custom Avatar
Quote from iskall on February 16, 2019, 5:47 pmHello, great plugin.
My code is as below right now, what I need is another function to change it from after post author into before post author, if that is possible 🙂
<?php add_action('asgarosforum_after_post_author', 'my_function_asgaros_cabinet', 30, 1); function my_function_asgaros_cabinet($author_id) { ?> <?php echo '<a href="######" title="'.__('Message Privé','rcl-asgaros').'">Send Message</a>'; ?> <div class="forum-avatar" style="background: url('<?php echo $iv_profile_pic_url=get_user_meta($author_id, 'iv_profile_pic_url',true);?>') center center no-repeat; background-size: cover;"></div> <?php } ?>
Hello, great plugin.
My code is as below right now, what I need is another function to change it from after post author into before post author, if that is possible 🙂
<?php add_action('asgarosforum_after_post_author', 'my_function_asgaros_cabinet', 30, 1); function my_function_asgaros_cabinet($author_id) { ?> <?php echo '<a href="######" title="'.__('Message Privé','rcl-asgaros').'">Send Message</a>'; ?> <div class="forum-avatar" style="background: url('<?php echo $iv_profile_pic_url=get_user_meta($author_id, 'iv_profile_pic_url',true);?>') center center no-repeat; background-size: cover;"></div> <?php } ?>
Uploaded files:
Quote from Asgaros on February 16, 2019, 8:37 pmHello @iskall
I suggest you to use the official get_avatar_url filter which allows you to overwrite the avatar-URL which is returned by the get_avatar() function:
https://developer.wordpress.org/reference/hooks/get_avatar_url/
In this case you dont need to re-implement the avatar-stylings and also dont need to move anything around.
Hello @iskall
I suggest you to use the official get_avatar_url filter which allows you to overwrite the avatar-URL which is returned by the get_avatar() function:
In this case you dont need to re-implement the avatar-stylings and also dont need to move anything around.