In this tutorial, I will show you how to add Star Rating Feature to default blogger template and custom blogger template.Follow the given steps below:
Screenshot Demo Of Star Ratings Widget
How To Add Star Ratings Add Star Rating Widget to Default Blogger Template
- Go to Blogger Draft
- Choose Blog From List > Layout
- Click "Edit Post" On The "Blog Post" Page Element (Demo Screen Below)
- After Clicking on "Edit", a window will pop and it will look like the image below. You have to check the star ratings box. (see image below)
- You can arrange this widget in "Arrange Items" option area.Now, save and it's done.
Add Star Rating Widget To Custom Blogger Templates
- Go to Blogger Dashboard > Edit HTML > Checked The "expand widget templates" Box.
- Press (Ctrl+F) and Search This Given Code
<div class='post-footer-line post-footer-line-1'>
- If you cannot find this, search for the following instead:
<p><data:post.body /></p>
- After/Below This Line (either the post-footer or post.body), Add The Following Code
<b:if cond='data:blog.pageType == "item"'>
<span class='star-ratings'>
<b:if cond='data:top.showStars'>
<div expr:g:background-color='data:backgroundColor' expr:g:text-color='data:textColor' expr:g:url='data:post.absoluteUrl' g:height='42' g:type='RatingPanel' g:width='180'/>
</b:if>
</span>
</b:if>
- Next, Find This Blogger Template
<b:include name='nextprev'/>
- Just After This Line, Paste The Following Code
<b:if cond='data:top.showStars'>
<script src='http://www.google.com/jsapi' type='text/javascript'/>
<script type='text/javascript'>
google.load("annotations", "1");
function initialize() {
google.annotations.createAll();
google.annotations.fetch();
}
google.setOnLoadCallback(initialize);
</script>
</b:if>
- Save Your Template and Its Done
- Now, Go to Blogger Draft > Layouts > Under ‘Blog Post’ widget, select Star rating. And save the changes.
0 comments:
Post a Comment