Site logo

Archived topic

How to add 'Review by' next to author in a blog post?

1 reply · Started by crosby87 on September 6, 2021

Viewing posts 1–2 of 2

Hi there,

I would like to add a 'Reviewed by' Author option for certain articles that were written by Author X, but review by Author Y.

Could you please help with this?

See an example here: https://www.bankrate.com/investing/best-investments/

Hi there,

For starters, do your posts already have some sort of "reviewer" post meta associated to them? This is necessary so we know where/how to pull that data/value from. :D

Once we have that, it'll be quite easy to display it as we only need to pick a hook to place it on.

By default, WordPress only have get_the_author() which gets the original author of the post, and get_the_modified_author() who did the last modification/edit on the post.

If you're asking for ideas on how to associate a user as a reviewer, consider this:

Since you're trying to associate a "Reviewed by" user on a post, you can try adding a ACF plugin custom field to each post with the field taken from the list of users of your site.

This way, you can edit each post's custom field (in a form of a dropdown option, assuming you used "Users" field - https://www.advancedcustomfields.com/resources/user/) to pick your reviewer from. :D

This archived topic is closed to new replies.