Community Forums › Forums › Archived Forums › General Discussion › How Do I Use Schema Support?
Tagged: Schema Ratings
- This topic has 10 replies, 3 voices, and was last updated 10 years, 7 months ago by Brad Dalton.
-
AuthorPosts
-
August 9, 2013 at 7:42 am #55219WilliamMember
Hi there,
I was happy to see support for Schema markup in Genesis 2.0. Now I just don't know how to use it in my posts and pages. Am I missing a documentation guide? For example, I'd like to include ratings for reviews as one example.
–William
http://williambeem.comAugust 9, 2013 at 7:50 am #55221Brad DaltonParticipantThere's a full guide by Gary Jones which lists all the changes to Genesis 2.0 including the schema
You can also install a reviews plugin or add custom schema to Genesis manually.
August 9, 2013 at 12:53 pm #55296WilliamMemberThanks, I'll look for the guide. I don't want to add a plugin or change code to perform the task, since it's a component of Genesis 2.0. All I want to know is how to use it.
–William
http://williambeem.comAugust 9, 2013 at 1:10 pm #55301Brad DaltonParticipantIts built in. No need to do anything unless you want to add custom schema.
You can see it in the source code.
August 9, 2013 at 2:21 pm #55316WilliamMemberMaybe I'm being dense, but I don't see how to specify a rating in a post or page.
–William
http://williambeem.comAugust 10, 2013 at 1:22 am #55410Brad DaltonParticipantThe easiest way is to install a plugin for ratings and reviews.
There's many to choose from and i would suggest testing them locally on a copy of your theme first to see which is the best for your needs.
August 10, 2013 at 8:58 am #55462WilliamMemberWhat is the point of using a plugin when the feature is supposed to be built into Genesis 2.0?
–William
http://williambeem.comAugust 10, 2013 at 9:46 am #55470Brad DaltonParticipantIt is built in however you would need to add custom schema for anything other than the defaults which you can do manually or by installing a plugin for specific schema.
Ratings aren't built in.
August 10, 2013 at 11:40 am #55495WilliamMemberOK, now that clarifies it for me. It really sucks, but I understand. Thanks for sticking with me until I got it.
–William
http://williambeem.comSeptember 3, 2013 at 10:14 am #60452Eli OverbeyMemberI am a little late to this, but I am adding a plugin for ratings and reviews on post types.
I am using the WP-PostRatings Plugin (works great for my needs) - http://wordpress.org/plugins/wp-postratings/installation/
But my question is, what is the best way to implement this into Genesis? I don't want to duplicate the existing schema.As of right now, I have:
//* Add a comment rating add_action( 'genesis_after_comments', 'sp_comment_policy' ); function sp_comment_policy() { if(function_exists('the_ratings')) { the_ratings(); } }
The function the plugin tells you to add is:
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
but it does not copy and paste with Genesis. As you can see above, I modified the 'sp_comment_policy' function, and the output works, but I want to do it correctly.Thoughts?
September 3, 2013 at 11:02 am #60458Brad DaltonParticipantYou can use this PHP code which only displays the ratings on single posts in a custom post type:
If you have multiple ratings setup, you can echo the shortcode for each conditionally.
Replace portfolio in the code with your CPT name or the number in the shortcode.
Change the hook position if needed.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.