WordPress.org

Ready to get started?Download WordPress

Forums

Co-Authors Plus
[resolved] Showing custom fields for Guest Authors (2 posts)

  1. krosenberg
    Member
    Posted 1 year ago #

    I am using the User-Titles plugin to display an author's title (ex: Associate Sports Editor) for a newspaper website. However, I'd like to give titles to Guest Authors as well. I added a custom field, guest-title, to the post type Guest Author, but how should I show this custom field value in single.php ?

    I would typically use get_post_meta($post_id, $key, $single); but I do not know how to get the $post_id of the Guest Author associated with the current post.

    Any ideas?

    http://wordpress.org/extend/plugins/co-authors-plus/

  2. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    If you're using get_coauthors() to get the co-authors, then $author->ID will be the post ID

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic