Solved

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

Posted on 2012-04-10
5
434 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
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).

739 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