Post Loops

You can show your ratings in your theme’s post loop such as category, tag, author and search pages in the following ways:

Step 1: Go to Ultimate Reviewer > Review Templates are created a new template which will be used to display your site ratings.

Step 2: Insert the Show Rating element and customize the appearance how you want. Get the ID of the template you’ve just created.

Step 3: Now you need to insert this template into your post loop for archive pages (categories/search/author etc.) by using the following code:

For Elementor use:

<?php if ( defined( 'ELEMENTOR_VERSION' ) ) {     
    echo \Elementor\Plugin::instance()->frontend->get_builder_content_for_display( 123 ); 
} ?>

For WPBakery Page Builder use:

<?php if ( function_exists( 'vc_set_as_theme' ) && 'wpb' === $builder ) {
    echo do_shortcode( '[gpur_review_template template_id="123"]' );
} ?>

Replace “123” with your own template ID.

Step 3: How you insert the template into your post loop is going to be different for every theme. You will need to look at your theme files and find the code that generates the post loop, this may be inside index.php,  archive.php and/or search.php. If you can overwrite this file, you can copy the file to your child theme and insert the code provided above. Alternatively you may be able to hook into a filter. If you’re unsure contact the theme developer and ask them how to insert code into the post loop.