0

I'm building a wordpress theme for a small news publication. Each post has one or more authors, for which I am using a custom taxonomy. Each author has a single title (such as Editor, Writer, etc.) in each post. I would prefer not to make a solution which involves setting a time range for titles, since titles may change frequently.

I am unsure how to implement this.

I was thinking of storing the title as part of the author term, but it's important that the user be able to see all posts the author has written, regardless of their title at the time.

I was also thinking of storing the titles as postmeta, but then there would be no way to tell which title was associated with which author.

I would use term meta but it looks like that would only allow one title per author, and it's important that if an author is a Writer, and later becomes an Editor, that their old posts still show that they were a Writer at the time.

Sorry if I'm using any terminology wrong; I'm slightly new to Wordpress development. Does anyone have any suggestions as to what I could do?

1
  • Sounds like you just need a list of <key> => <value> pairs. I know this is against the grain here but you could really simplify relationships of posts with a plugin like Posts To Posts or Advanced Custom Fields. ACF would let you create a repeater with your two fields [ <author> => <contribution> ] in very little time.
    – jgraup
    Commented Oct 25, 2016 at 3:35

1 Answer 1

-1

I recommend using the Co-Authors plugin instead of building your own solution. That way, you use the existing WordPress user roles (Editor, Author, etc).

You'll then need to edit your theme's template to show multiple authors. The plugin author provides documentation on how to do this though.

Update - added more details based on comment below.

For example

You would edit your single.php template and replace the_author() template tag with coauthors().

7
  • Lo ciento, link only answers... no bueno
    – jgraup
    Commented Oct 25, 2016 at 3:58
  • @jgraup it's not a 'link-only' answer. I added context around it per the SE guidelines. It's a perfectly valid answer so please remove your downvote. Thx.
    – cowgill
    Commented Oct 25, 2016 at 4:15
  • I feel your pain. I just don't think this answer is useful to the OP as an answer to the question. I'm happy to remove the downvote if the answer helps the author -- specifically for the fact that Author's have custom titles per role. The plugin you provided just seems to add a list of authors and excludes their roles (such as Editor, Writer, etc.).
    – jgraup
    Commented Oct 25, 2016 at 4:35
  • Thanks for answering, but I don't see how this is really an answer to the question. There would still be no way to assign a title per author per post.
    – Tablesalt
    Commented Oct 25, 2016 at 5:46
  • @Tablesalt would an 'Editor' always be an 'Editor' and a 'Writer' always a 'Writer'? Or could an 'Editor' also be a 'Writer' on a different post?
    – cowgill
    Commented Oct 25, 2016 at 5:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.