Use Child Theme to Customize the Review Template More

With version 10.4.4 and higher you can fully customize the review template by using a child theme. If you need help creating a child theme click here

Here are the steps....

1) Create a folder in your child theme called:

wprevpro

2) Create a file in that folder for the template style you want to override. 

template(style number).php

For example for style 1....

template1.php

This is what it looks like for my Divi-child theme overriding review template style 1...

Image 285

3) Now you'll want to copy the html out of the following file and paste it in the template1.php you just created. In the plugin file...

wp-review-slider-pro/public/partials/template_style_1.php

on line 220 to line 231 copy the html. It looks like so....

Image 2047

Then paste it in to the template1.php file you created.

4) Now you can make changes to the template1.php you created and the plugin will use this file instead of the html in the original file. The best part is that these changes will persist even if the plugin is updated.

For example, you could add the location name the review came from like so...

Image 2048

Here is a list of all the different review variables you could access.

id
pageid
pagename
created_time
created_time_stamp
reviewer_name
reviewer_email
company_name
company_title
company_url
reviewer_id
rating
recommendation_type
review_text
hide
review_length
review_length_char
type
userpic
userpic_small
from_name
from_url
from_logo
from_url_review
review_title
categories
posts
consent
userpiclocal
hidestars
miscpic
location
verified_order
language_code
unique_id
meta_data
owner_response
sort_weight

Note: Some of these values may be json encoded. For example if I want to display the response from the owner I first have to decode the values. For example it will return something like this...

{"id":"","name":"josh","comment":"test owner response","date":"2021-01-01"}

To show only the owner "comment" you could do this...

Image 1057



This article was helpful for 11 people. Is this article helpful for you?