• Resolved theApe

    (@theape)


    How do I pull in the user meta data or the author meta in the search.php template?

    I have this at the moment in the loop…

    $user = get_userdata($post->post_author);
    the_author_meta( 'first_name',$user );

    But it returns nothing. Any help would be greatly appreciated.

    This wouldn’t work either.
    the_author_meta('first_name');

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter theApe

    (@theape)

    I’m using the search function to search custom post types if that makes any difference.

    Thread Starter theApe

    (@theape)

    Marking this as solved as it was a stupid mistake, where I’d indexed the user profiles and they were being included with the search, hence the lack of user meta.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Usermeta Data in the search.php loop’ is closed to new replies.