Solved

Using WP-PostRatings in "submit your opinion" part of WordPress site

Posted on 2012-04-10
5
422 Views
Last Modified: 2012-04-15
Hi Folks,

Ok...I know I'm not the sharpest tool in the shed--that being said, I'm working on a Wordpress site where I want users to:
*post an opinion/review of a business
*rate the business using a five star rating system.

I've activated WP-Postratings. How do I make it so the rating mechanism is available when a person writes a review? Because each post is different....

Thanks
D
0
Comment
Question by:dlewis61
  • 3
  • 2
5 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 37841048
>> How do I make it so the rating mechanism is available when a person writes a review?

According to that plugin's instructions you can do it one of two ways:

1) Edit your theme's single.php template and add the following code where you want the ratings to show up:

<?php if(function_exists('the_ratings')) { the_ratings(); } ?>

Open in new window


2) In the visual editor, use the shortcode [ratings]
0
 

Author Comment

by:dlewis61
ID: 37841076
Thanks. I'll give this a try, but  I can't conceptualize that each time someone creates a new review, this code would be there. I won't know til I get in there though.
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 350 total points
ID: 37841093
>> I can't conceptualize that each time someone creates a new review, this code would be there

How so?

The way WordPress (and all CMS platforms) works is that there is a single template file that controls the display of data.  It's not like Web 1.0 where you have:

page1.html
page2.html
page3.html
etc.

where each file has the content.  Instead, all of your content is stored in a database and the single display file queries the database with the parameters selected by the user (the item they click on) and returns the relevant content.  This plugin works off the same system.  It stores the ratings and reviews in a database table of its own and uses the same post ID to reference the entries.  When you click on a specific post, the plugin queries its database and returns all of the matching reviews for that post in whatever format it supports.

Does this help or did you mean something else?
0
 

Author Comment

by:dlewis61
ID: 37849215
You rock!! This concept was never explained to me like that. I used the [ratings] in visual editor and it works!! I will close this question but if I have more questions I will just post again.
Thanks so much!
d
0
 

Author Closing Comment

by:dlewis61
ID: 37849217
very informative and gives background explanation to resolution.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question