Adding Automatic Article Rating Widget to Blogger

February 13, 2024
14 mins read
Adding Automatic Article Rating Widget to Blogger

In this article, we are going to add Article Rating Widget to any Blogger Website. Visitors can rate your articles through this widget. Also you don't need to add any codes again and again in article HTML as this widget will be added automatically to all of your articles.


How to add Automatic Article Rating Widget?

Adding Article Rating Widget to Blogger Website will not require much knowledge about HTML, CSS or JS because I have already designed it for you. What you need to do is to implement the codes at right place in your Blogger Theme XML.

Important! Before we start adding codes in XML, I will recommend you to take a Backup of your current theme. By chance if any problem occurs, you can restore it later.

Step 1: First of all Login to your Blogger Dashboard.

Step 2: On Blogger Dashboard, click Theme.

Step 3: Click the arrow down icon next to 'customize' button.

 

Step 4: Click Edit HTML, you will be redirected to editing page.

Step 5: Now search the code ]]></b:skin> and paste the following CSS Codes just above to it.

If your template has a dark mode feature, and if you want a different color when in dark mode, you can customise the codes as per your need. Each template can have a different dark mode class, so please adjust it, you can replace the marked class with your template dark mode class.


/* Article Rating by  Briceka*/ .pRate{display:none;padding:30px 0 10px 0} .pRateC{display:flex;max-width:400px;margin-top:30px;padding:25px 17px;line-height:25px;background:#fff;border-radius:5px;box-shadow:0 5px 35px rgba(149,157,165,.3);font-size:16px;font-family:inherit;color:#08102b;text-align:center;justify-content:center} .pRateC .ld{display:inline-flex;align-items:center;font-size:13px;opacity:.8} .pRateC .ld svg{width:18px;height:18px;margin-right:5px;stroke:none !important;fill:#08102b} .pRateS{background:#fff;position:absolute} .darkMode .pRateC, .darkMode .pRateS{background:#252526} .darkMode .pRateC{box-shadow:0 10px 40px rgba(0,0,0,.2);color:#fefefe} .darkMode .pRateC .ld svg{fill:#fefefe}
 


Step 6: Now add the following HTML just below to <data:post.body/>.
 


<b:if cond='data:view.isPost'>  <!--[ Article Rating by Briceka]-->  <div id='pRating' class='pRate'>    <div class='pRateC'>      <div class='ld'><svg viewBox='0 0 50 50' x='0px' y='0px'><path d='M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z'><animateTransform attributeName='transform' attributeType='xml' dur='0.6s' from='0 25 25' repeatCount='indefinite' to='360 25 25' type='rotate'/></path></svg>Getting Info...</div>      <div id='wpac-rating' class='pRateS'></div>    </div>  </div> </b:if>
 


Step 7: Now add the following JavaScript Code just above to </body> tag. If you don't find it, it is probably already parsed which is &lt;/body&gt;.

Following is Lazyload JavaScript, so don't worry about Lighthouse, Performance and Loading Speed. Anything will not be affected.
 


<b:if cond='data:view.isPost'>  <script>/*<![CDATA[*/ /* Article Rating Script by Briceka(Lazyload) */ var lazyrs=!1;window.addEventListener('scroll',function(){(0!=document.documentElement.scrollTop&&!1===lazyrs||0!=document.body.scrollTop&&!1===lazyrs)&&(!function(){wpac_init=window.wpac_init||[],wpac_init.push({widget:'Rating',id:32139}),function(){var t,e;'WIDGETPACK_LOADED'in window||(WIDGETPACK_LOADED=!0,(t=document.createElement('script')).type='text/javascript',t.async=!0,t.src='https://cdn.widgetpack.com/widget.js',(e=document.getElementsByTagName('script')[0]).parentNode.insertBefore(t,e.nextSibling))}();document.querySelector('#pRating').style.display='block';}(),lazyrs=!0)},!0); /*]]>*/</script> </b:if>
 


If you have already added Rating Widget by Widget Pack on your website and you are going to replace it with this Widget, replace the marked Rating ID with the old Widget Rating ID or create a new Rating Widget ID here. Keep as it is if you don't have idea about it because we do not want you to face any difficulty.

Step 8: Lastly, Save the changes by clicking on this icon

That's done! Now Article Rating Widget will be automatically added to all of your articles. Visitors can now rate your articles.

Keep reading

More posts from our blog

Free 10K Twitter Followers Generators in 2024: Real and Fake
By March 07, 2024
Perhaps of the main measurement on Twitter is the quantity of followers you have. While it is fundamental to have a huge following, developing your...
Read more
BuyMeTea script NULLED - The best way for creators and artists to accept support and membership from their fans
By February 24, 2024
BuyMeTea is the best way for creators and artists to accept support and membership from their fans also it’s a social media platform. An author can...
Read more
How To Download And Install GBWhatsApp Pro Latest Version For Android
By February 21, 2024
GBWhatsApp Pro is a modified version of the popular messaging app, WhatsApp. It offers a wide range of additional features and customization options...
Read more