I am currently producing a website that includes, among other things, a news/blog section. The authors of the individual posts are registered users of the site and below the articles their name, photo and a small bio appears.
The “Author” field of each post only contains the ID of the author, the additional information is stored in the user profiles and is displayed in the post template.
But sometimes it happens that posts of guest authors should appear, for which no user profile exists. Only the name of the guest author should be displayed in the post template. At the moment there is a field “Guest_author” in the posts. In the template it is checked whether either the field “Author” or the field “Guest_author” contains information, these are then output accordingly.
I find the solution with the two fields to be “inelegant” and potentially error prone. How would you guys approach this problem? Perhaps someone has solved a similar problem before.
I am grateful for any suggestion.