Author tags not calling…
I am trying to set it up so that when you click on the author link in the sidebar, it calls all the posts of that author. That works very well, but I have tried to place a header at the top that states the authors name followed by “archive”. I have tried using this tag: <h2 class=”pagetitle”><?php the_author_nickname(); ?>’s Archive</h2>
but all that shows up is ” ‘s Archive”. I don’t understand why it’s not working, as my time and date archives are set up the same way and work just peachy. Can anyone help me with this? See for yourself…http://trashcast.com/author/travis/
any help would be greatly appreciated as I have been trying to get this working for a few weeks now 🙂
As far as I know, it is within the loop. The codex states the same thing for time and date tags, they work just fine, and they all are in the same loop. Do I need to edit multiple loops? The one I have worked on is in archive.php. Should I place it in another location as well?
This is “The Loop”:
Well can anyone suggest another way of accoomplishing my goal? Why do the date and time tags return data if they are also not within the loop?
“Why do the date and time tags return data if they are also not within the loop?“
A theme using tags in this way benefits from a certain leakiness in The Loop, in that many (though not all) post array values from the last post on the page are still extant.
Anyway, you could try ‘querying’ the last post object just above or before the sidebar code you list above:
If that fails, try a global scope:
global $post, $wp_query;
The link Beel provides offers more advice/alternatives.
- The topic ‘Author tags not calling…’ is closed to new replies.