Solved

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

Posted on 2012-04-10
5
442 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

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Find out what you should include to make the best professional email signature for your organization.
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…
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…

691 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