admin管理员组

文章数量:1122832

I'm looking for guidance on adding "Reviewed by" and "Edited by Author" sections to my WordPress site. Here's details

Theme: I'm using the GeneratePress theme.

Purpose: I want to display information about who reviewed and edited the content, for transparency and credibility.

Content Type: This is for both blog posts and pages.

Desired Features: Display the names of the reviewer and editor. Optionally include dates for when the review/edit was done. Preferably, this should be implemented using a plugin or custom code snippet that integrates smoothly with my current setup.

I'm considering using custom fields or a plugin, but I'm open to suggestions on the best approach to implement this feature. If anyone has experience with this or can recommend plugins that work well with GeneratePress, I'd greatly appreciate your input!

Thank you!

I'm looking for guidance on adding "Reviewed by" and "Edited by Author" sections to my WordPress site. Here's details

Theme: I'm using the GeneratePress theme.

Purpose: I want to display information about who reviewed and edited the content, for transparency and credibility.

Content Type: This is for both blog posts and pages.

Desired Features: Display the names of the reviewer and editor. Optionally include dates for when the review/edit was done. Preferably, this should be implemented using a plugin or custom code snippet that integrates smoothly with my current setup.

I'm considering using custom fields or a plugin, but I'm open to suggestions on the best approach to implement this feature. If anyone has experience with this or can recommend plugins that work well with GeneratePress, I'd greatly appreciate your input!

Thank you!

Share Improve this question asked Jul 31, 2024 at 7:09 NowonlineNowonline 11 bronze badge 2
  • plugin recommendation are offtopic here (wordpress.meta.stackexchange.com/questions/1217/…). do you project to develop this plugin yourself ? – mmm Commented Jul 31, 2024 at 9:00
  • Would recommend you create your own custom metabox to add to posts and pages, build out the option to add users (Select2 user search would work) and then just query the new post meta your meta box adds to each entry. – Tony Djukic Commented Aug 1, 2024 at 20:38
Add a comment  | 

1 Answer 1

Reset to default 0

You can achieve this with the help of ACF Plugin through which you are able to create Custom Fields and these fields will be helpful in getting the information regarding Review Person and Review date or any other information you needed.

After this you can go to themes files and here you need to edit single.php and page.php file, and then you need to add the code to the position where you want to show.

<?php if ( function_exists( 'get_field' ) ) {
?>
    <div class="post-meta">
        <?php
        if ( $reviewer = get_field( 'reviewed_by' ) ) { ?>
            <p>
                Reviewed by: <?php echo esc_html($reviewer); ?>
            </p>
        <?php
        }
        ?>
        <?php
        if ( $review_date = get_field( 'review_date' ) ) {
        ?>
            <p>
                Review Date: <?php echo esc_html( $review_date ); ?>
            </p>
        <?php
        }
        ?>
        <?php if ( $editor = get_field( 'edited_by_author' ) ) {
        ?>
            <p>
                Edited by: <?php echo esc_html( $editor ); ?>
            </p>
        <?php
        }
        ?>
        <?php
        if ( $edit_date = get_field( 'edit_date' ) ) { ?>
            <p>
                Edit Date: <?php echo esc_html( $edit_date ); ?>
            </p>
        <?php
        }
        ?>
    </div>
<?php
}
?>

本文标签: pluginshow can add review byedit by (Author) on wordpress site