• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

Genesis Review & Star Rating System For Single Post Types

In this case, the template named single-listing.php enables comment authors to add a review and star rating from 1 to 5 simply by clicking the stars. This template loads on the single listings for AgentPress Pro users however can easily be used in any other theme with any other post type or standard single posts.

Reviews are then displayed before the single entry content with a average rating added before the reviews loop like this :

Add Review Star Ratings To Single Listings

To add the rating/review system to single posts or other custom post types, change the file named using the WordPress Template Hierarchy. For single posts in any category, use single.php. For single posts in a specific category named reviews, name the file single-reviews.php.

Demo Video

Shows stars added to reviews on single post types.

Tested using the Genesis Sample child theme by StudioPress with the AgentPress Listings plugin however will work in any Genesis child theme.

Also tested using AgentPress Pro.

AgentPress Pro reviews star rating single listing

Installation Steps

There’s 4 steps :

  1. # Install the WP Post Rating plugin by Shoaib Saleem.
  2.  
    Step 1

  3. # Upload the file named single-listing.php to your child theme folder like this :
  4.  
    Step 2

  5. # Copy & paste the PHP code ( without the opening PHP tag ) from the functions.php file to the end of your child themes functions file.
  6.  
    Step 3

  7. # Copy & paste the CSS from the style.css file to the end of your child themes style sheet and clear caching.
  8.  
    Step 4

Download Folder

Related Tutorials

  • Code Star Rating In WordPress
  • Dynamic Rating System With Stars
  • Genesis Star Rating System For Reviews

AgentPress Pro Theme Custom Post Type

Reader Interactions

Comments

  1. Alex says

    July 19, 2020 at 6:37 am

    Is it possible to change the date format?

    Log in to Reply
    • Brad Dalton says

      July 19, 2020 at 9:56 am

      Published this for you Alex https://wpsites.net/web-design/using-get_comment_date-get_comment_time-in-a-custom-comments-loop/

      Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.