• Resolved veras

    (@veras)


    I understand that the reviewer’s name that shows up in the Google a Rich Snippet is the name of the WordPress author. How can I give a unique name to each review I create on different pages without creating new WordPress users for each?

Viewing 1 replies (of 1 total)
  • Plugin Author MyThemeShop

    (@mythemeshop)

    Hello,

    Thank you for using WP Review.

    Custom author feature is only available in Pro version of the plugin.

    However, you can make use of custom fields to make this possible and override WP Review box template within your child theme.

    For example, you can add “custom_review_author” custom field ( http://take.ms/ny4ij ).

    Then, you will have to create “wp-review” folder inside your child theme folder and copy default.php file from plugin’s “box-templates” folder and paste it inside newly created “wp-review” folder of your child theme.

    Now open child theme/wp-review/default.php and replace this:
    <span itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="name" content="<?php echo esc_attr( $review['author'] ); ?>"></span>
    with this:

    
    <?php
    $author = get_post_meta( get_the_ID(), 'custom_review_author', true );
    if ( empty( $author ) ) {
    	$author = $review['author'];
    }
    ?>
    <span itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="name" content="<?php echo esc_attr( $author ); ?>"></span>
    

    Hope that helps.

    Thank you.

Viewing 1 replies (of 1 total)

The topic ‘Reviewer name’ is closed to new replies.