I want to display author role on archive and author page outside loop I found this code and it works fine within the loop
Getting an author’s role in WordPress
But when I am adding this to archive and author page its giving me warning message called
Warning: array_shift() expects parameter 1 to be array, null given in
How to solve this?
These examples are using the function I gave in my COMPLETE ANSWER Here. In your functions.php file:
In your archive page:
As for your author template, the WordPress Codex on Author Templates has a lot of useful information. You can do something like this: