
How to display author avatar in Wordpress 5
You can display author avatar in Wordpress. You have to call the get_avatar() method to get the author avatar in posts or pages in Wordpress.
Answers 1
-
Display author avatar in wordpress 5
--PATH wp-content\themes\<twentytwentyone>\<header>.phpecho get_avatar($id_or_email = get_the_author_meta('user_email'), $size = 50, $args = array('class' => array( 'avatar', 'img-circle')));
0You can use the get_avatar() method to get the author avatar in wordpress. In my case, I have used it in my wp-content\themes\twentytwentyone\header.php file to get the author avatar in my website header section. You can use it anywhere as per your requirement.
Random Code Snippet Queries: Wordpress
- Remove every class and ID from the wp_nav_menu
- Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2348617 bytes) in /home/xxx/public_html/wp-includes/plugin.php on line xxx
- Remove class from body tag in wordpress
- Show template file name in wordpress
- Add new class to body tag in wordpress