Monday, 26 August 2013
the_author_meta not resetting
the_author_meta not resetting References I\'m looping through posts normally. I want to display the author ... simple gives me \"Patrick Daly\". Nah, I just want the first name, so I use and now I get .... \"John\"??? So the actual author of the post is \"Patrick Daly\" -- whose user account has all the correct information in it (nothing about John). The loop seems to not be clearing \"John\'s\" meta and continues to reuse it. It does it\'s job when using the_author(); though. Anything I need to be doing to clear the_author_meta();? Here\'s what each function outputs on a single post (where the values in the database don\'t have John Doe): the_author_meta( \'ID\' ); : 1 the_author_meta( \'first_name\' ); : John the_author_meta( \'last_name\' ); : Doe the_author_meta( \'display_name\' ); : Patrick Daly the_author(); : Patrick Daly This is a really if( have_posts() ) query, but I\'ve tried wp_reset_postdata() and of course it didn\'t work.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment