I’m looking a way tho change the the_author();
function in the loop,
I have post meta data with the name of the user who posted.
I need to do this:
- If the user is registered, show
the_author();
, but if isn’t show the data from the post meta.
Since the_author()
, function doesn’t have a callback function I’m a little lost, maybe making a function?
The idea is replace the_author()
in my theme.
There is no need to change the
the_author()
function itself. A simple conditional tag will do the trick. Example:Hope that helps!
EDIT: Updated the function.