[wp-trac] [WordPress Trac] #22992: get_the_author() not working outside the post query
WordPress Trac
noreply at wordpress.org
Tue Dec 18 16:28:30 UTC 2012
#22992: get_the_author() not working outside the post query
--------------------------+------------------------------
Reporter: alexvorn2 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Template | Version: 3.5
Severity: normal | Resolution:
Keywords: |
--------------------------+------------------------------
Comment (by alexvorn2):
I figured out that this function does work only in the loop by the doc...
I think it should work outside the loop, getting the value from
get_queried_object() function... for example use
get_queried_object()->display_name if is called outside the loop.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22992#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list