I have seen your tutorial about creating a review site and I understand how it works. What I would like to know is if you know of any plugin which ca work well together with toolset to create rich snippets (schema.org). I really need to display star ratings etc. and in todays world, it is important to use these rich snippets to rank better on the search engies.
Hi triggeru571,
I did not seen such a plugin before, but you can try search in wordpress Plugin Directory, for example:
http://wordpress.org/plugins/search.php?q=rating+snippets
Hope it help
Hi Luoy,
I sorted the Schema and learnt how to code it into Content Templates, so that part is fine. Using plugins for schema does not quite work for my purpose as it causes all sorts of issues. So I actually posted an example of what I did here to share with your clients: https://toolset.com/forums/topic/schema-org-fields/
Now to the star rating I have two possible options and wanted your opinion.
Option 1. Create star rating fields using Types fields and cred while a user is writing a review, then have those star ratings display on the post. The problem here is that I would then need to calculate the average rating of the post given to it by reviewers, and I have absolutely no idea how to do that.
Option 2. I could use http://wordpress.org/plugins/wp-postratings/ which is the only plugin which works properly with Views (the others somehow display twice on posts created with views). The problem with this approach is that I would need to display the star rating within the cred form, and if you click the rating, it actually gives the rating to the form rather than the post. Alternativly, I would need to display the ACTUAL form on the page (and I am not sure how to do that either - working with links at the moment) and have the star rating just above the form. Not ideal as it means that I cannot make the star rating compulsory upon submitting the form.
Option 1 would be the best solution, so how would I go about calculating an average?
I assume you are going to try Option 1, about calculating an average rating, it is not possible within toolset
Please try create a custom shortcode for it:
http://codex.wordpress.org/Shortcode_API
Have you tried this plugin?
hidden link
@luoy: If it is not possible to calculate the average (those shortcode API's don't really seem to cut it. The other solution would solve the problem so how can I therefore embed CRED as a form into a post. In other words, to have the actual form in the page rather than a link to it.
@Farrel, No I have not tried it but seems very promising so I will go ahead with that suggestion.
@luoy - Just to clarify. I actually know how to display the actual form in the post. My problem is how to get that form to display the parent. In my Content Template I am using the following shortcode to display both the plugin rating system and cred, but unsurprisingly, cred is not selecting the post parent to attach the review to.
Rate this business: [ratings]
[cred_form form="Restaurants and Cafes Reviews"]
Could you describe more details about the question "cred is not selecting the post parent to attach the review to."
How can I duplicate it in my localhost?
Here is a document about "Displaying Fields of Parent Pages":
https://toolset.com/documentation/user-guides/displaying-fields-of-parent-pages/
Hope it help
Hi Luoy,
What I mean is this. Normally, when we link from a post to a cred form, and the cred form opens, the Parent Page is pre-selected in the dropdown. Now, because I am not actually using a Link, but displaying the form directly in a post, it seems cred does not know which the parent is, even though the form is dislpayed in the parent post. To replicate it you can do the following.
Creat a CPT Parent (in my case a restaurant listing)
Create a CPT Child of Parent above (in my case a review of the restaurant)
Create a CRED form.
Create a view template for CPT Parent. In the Content Template then simply add the CRED Form directly to Create Child Content. Do Not add the form to a Page as this will just create a link, which we do not want. You need to add the CREd form shortcode directly into the view template.
As you can see, the parent selector is not added. I can see why it is not added, but how do I resolve this?
triggeru571,
I have follow your steps to create test site in discover-wp, and send you an email with login details.
1) Creat a CPT Parent (in my case a restaurant listing)
hidden link
2) Create a CPT Child of Parent above (in my case a review of the restaurant)
hidden link
3) Create a CRED form for create new child post:
hidden link
4) Create a view template for CPT Parent
hidden link
I can see the parent selector is added:
hidden link
And I can set parent id as current restaurant-listing, by setting the default value:
[cred_field field="_wpcf_belongs_restaurant-listing_id" value="[wpv-post-id]"]
More help: cred-field
‘value’=> [optional] Preset value (translated automatically if WPML translation exists)
https://toolset.com/documentation/user-guides/cred-shortcodes/#cred-field
Hope it help
Hi Luoy, I have not received the access credentials. Could you send them please?
Never mind. I managed to get it to work. The reason it did not work for me before is because I forgot to add the Post ID to the value like this:
[cred_field field="_wpcf_belongs_restaurant-listing_id" value=""]
Very silly of me 🙂 Thanks a million Luoy.