Support » Fixing WordPress » How to add author name to custom get_post_meta

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Have you set a custom field named “author”? That is not how WP saves the post author by default, it only saves the user ID with posts (keyed as “author” or “post_author”). You then need to use something like get_userdata( $user_id ) to get the remaining author data.

    It’s not a great idea to save additional author data with post meta. Redundant data just increases the complexity of site maintenance. Ideally, no discrete information should appear in more than one place.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.