How add Multi colored Popular posts to blog

Hello,
           Today i am gonna to show you that how we can use multi colored popular posts .So the popular posts are those which most visited in your blog or site.So we want to display them in different colors.
So for we use some CSS codes to change them.as in the given image.                                                        


This will complete in a few steps.

1st Step:

            So of all go to your blogger dashboard and then go to Template and then go to Edit HTML.

2nd Step:

           In this step click on (Expand Widget Template) .

3rd Step:

              In this step search for the following tag as given below...


 /* Variable definitions
   ====================

So if this have some problem in searching you can't find it the paste it below autor information that is usually below this tag 


  <b:skin><![CDATA[/* 


This should end up with the this symbol 


  ----------------------------------------------- */


4th Step:


              In the 4th step paste the given HTML codes below the above codes.

 <Group description="PopularPosts Backgrounds" selector="#PopularPosts1">
<Variable name="PopularPosts.background.color1" description="background color1" type="color" default="#fa4242" value="#ff4c54"/>
<Variable name="PopularPosts.background.color2" description="background color2" type="color" default="#ee6107" value="#ff764c"/>
<Variable name="PopularPosts.background.color3" description="background color3" type="color" default="#f0f" value="#ffde4c"/>
<Variable name="PopularPosts.background.color4" description="background color4" type="color" default="#ff0" value="#c7f25f"/>
<Variable name="PopularPosts.background.color5" description="background color5" type="color" default="#0ff" value="#33c9f7"/>
</Group>



5th Step :


               in this step search for the following code.

 ]]></b:skin>

and above it add the following codes  as below.......



 #PopularPosts1 ul{margin:0;padding:5px 0;list-style-type:none}
#PopularPosts1 ul li{position:relative;margin:5px 0;border:0;padding:10px}
#PopularPosts1 ul li:first-child{background:$(PopularPosts.background.color1);width:90%}
#PopularPosts1 ul li:first-child:after{content:"1"}
#PopularPosts1 ul li:first-child + li{background:$(PopularPosts.background.color2);width:85%}
#PopularPosts1 ul li:first-child + li:after{content:"2"}
#PopularPosts1 ul li:first-child + li + li{background:$(PopularPosts.background.color3);width:80%}
#PopularPosts1 ul li:first-child + li + li:after{content:"3"}
#PopularPosts1 ul li:first-child + li + li + li{background:$(PopularPosts.background.color4);width:75%}
#PopularPosts1 ul li:first-child + li + li + li:after{content:"4"}
#PopularPosts1 ul li:first-child + li + li + li + li{background:$(PopularPosts.background.color5);width:70%}
#PopularPosts1 ul li:first-child + li + li + li + li:after{content:"5"}
#PopularPosts1 ul li:first-child:after,#PopularPosts1 ul li:first-child + li:after,#PopularPosts1 ul li:first-child + li + li:after,#PopularPosts1 ul li:first-child + li + li + li:after,#PopularPosts1 ul li:first-child + li + li + li + li:after{position:absolute;top:20px;right:-15px;border-radius:50%;background:#353535;width:30px;height:30px;line-height:1em;text-align:center;font-size:28px;color:#fff}
#PopularPosts1 ul li .item-thumbnail{float:left;border:0;margin-right:10px;background:transparent;padding:0;width:40px;height:40px}
#PopularPosts1 ul li a{font-size:12px;color:#444;text-decoration:none}
#PopularPosts1 ul li a:hover{color:#222;text-decoration:none}

6th Step:

              In this step find the following HTML codes.

 <b:widget id='PopularPosts1' locked='false' title='Popular Posts' type='PopularPosts'>
And Delete this until you reach on this tag as "delete the </b:widget>also):

 </b:widget>
Keep in Mind that after this the entire fragment of the HTML code should appear like this as .


 <b:widget id='PopularPosts1' locked='false' title='Popular Posts' type='PopularPosts'>
<b:includable id='main'>
  <b:if cond='data:title'><h2><data:title/></h2></b:if>
  <div class='widget-content popular-posts'>
    <ul>
      <b:loop values='data:posts' var='post'>
      <li>
        <b:if cond='data:showThumbnails == &quot;false&quot;'>
          <b:if cond='data:showSnippets == &quot;false&quot;'>
            <!-- (1) No snippet/thumbnail -->
            <a expr:href='data:post.href'><data:post.title/></a>
          <b:else/>
            <!-- (2) Show only snippets -->
            <div class='item-title'><a expr:href='data:post.href'><data:post.title/></a></div>
            <div class='item-snippet'><data:post.snippet/></div>
          </b:if>
        <b:else/>
          <b:if cond='data:showSnippets == &quot;false&quot;'>
            <!-- (3) Show only thumbnails -->
            <div class='item-thumbnail-only'>
              <b:if cond='data:post.thumbnail'>
                <div class='item-thumbnail'>
                  <a expr:href='data:post.href' target='_blank'>
                    <img alt='' border='0' expr:height='data:thumbnailSize' expr:src='data:post.thumbnail' expr:width='data:thumbnailSize'/>
                  </a>
                </div>
              </b:if>
              <div class='item-title'><a expr:href='data:post.href'><data:post.title/></a></div>
            </div>
            <div style='clear: both;'/>
          <b:else/>
            <!-- (4) Show snippets and thumbnails -->
            <div class='item-content'>
              <b:if cond='data:post.thumbnail'>
                <div class='item-thumbnail'>
                  <a expr:href='data:post.href' target='_blank'>
                    <img alt='' border='0' expr:height='data:thumbnailSize' expr:src='data:post.thumbnail' expr:width='data:thumbnailSize'/>
                  </a>
                </div>
              </b:if>
              <div class='item-title'><a expr:href='data:post.href'><data:post.title/></a></div>
              <div class='item-snippet'><data:post.snippet/></div>
            </div>
            <div style='clear: both;'/>
          </b:if>
        </b:if>
      </li>
      </b:loop>
    </ul>
    <b:include name='quickedit'/>
  </div>
</b:includable>
</b:widget>

7th Step:

              In this step you replace the above HTML code with the following codes.

 <b:widget id='PopularPosts1' locked='false' title='Popular Posts' type='PopularPosts'>
<b:includable id='main'>
   <b:if cond='data:title'>
    <h2><data:title/></h2>
   </b:if>
   <div class='widget-content popular-posts'>
    <ul>
     <b:loop values='data:posts' var='post'>
      <li>
       <b:if cond='data:showThumbnails == &quot;false&quot;'>
        <b:if cond='data:showSnippets == &quot;false&quot;'>
         <a expr:href='data:post.href' expr:title='data:post.title' rel='bookmark'><data:post.title/></a>
        <b:else/>
         <a expr:href='data:post.href' expr:title='data:post.snippet' rel='bookmark'><data:post.title/></a>
        </b:if>
       <b:else/>
        <b:if cond='data:showSnippets == &quot;false&quot;'>
         <b:if cond='data:post.thumbnail'>
          <img class='item-thumbnail' expr:alt='data:post.title' expr:src='data:post.thumbnail'/>
         <b:else/>
          <img alt='no image' class='item-thumbnail' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3oHssMhH71t51FbIYhFO1wcw3t47OKOGzbz3_PmmUfUmBxtwSTm3BzDvxzF4jtHePMR5iq-WsgkotdsiZQMk65zhfpN0HWuB2vDhp9UuXVjjb-rU5yz89yQr20-N500yqHIYDZJR4ung/s1600/default.jpg'/>
         </b:if>
         <a expr:href='data:post.href' expr:title='data:post.title' rel='bookmark'><data:post.title/></a>
         <div class='clear'/>
        <b:else/>
         <b:if cond='data:post.thumbnail'>
          <img class='item-thumbnail' expr:alt='data:post.title' expr:src='data:post.thumbnail'/>
         <b:else/>
          <img alt='no image' class='item-thumbnail' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3oHssMhH71t51FbIYhFO1wcw3t47OKOGzbz3_PmmUfUmBxtwSTm3BzDvxzF4jtHePMR5iq-WsgkotdsiZQMk65zhfpN0HWuB2vDhp9UuXVjjb-rU5yz89yQr20-N500yqHIYDZJR4ung/s1600/default.jpg'/>
         </b:if>
         <a expr:href='data:post.href' expr:title='data:post.snippet' rel='bookmark'><data:post.title/></a>
         <div class='clear'/>
        </b:if>
       </b:if>
      </li>
     </b:loop>
    </ul>
   </div>
  </b:includable>
</b:widget>

Last Step :

                    Click on the Save Template.
After this the setting is that go to Layout and click on the edit link of popular posts widget and then click on
(Display up to 5 posts ) and then save the widget.as in the screen.
So of you want to change the background color of the popular posts  widget you can easily change them as 
Go to Template and then go to Customize and then go to Advance and then popular post Background and then there you can change the color of background as you want.
So you have done this .
If you have any problem about this post you can comments below..
Thank you !

4 comments:

quyendz said...
21 June 2019 at 01:43

A debt of gratitude is in order for setting aside an ideal opportunity to talk about this, I feel unequivocally about it and affection adapting more on this point. In the event that conceivable, as you pick up mastery, would you psyche redesigning your online journal with more data? It is greatly useful for me.jogos friv gratis
Jogos online
jogos 4 school

Nina Athena said...
22 March 2020 at 16:24

Thank you for sharing this on your blog! It is very helpful for my insight! Please update more posts about this. Would love to see more updates from you.

Melbourne Web Designer

Anonymous said...
29 August 2021 at 19:15

I have a fancy for your posts and I think they are very good. I can make full use of them to handle with some problems in my life. Articles seems to be written well, so they are easy to understand. Thank you for your sharing.
This is very interesting, You’re a very skilled blogger. I’ve joined your rss feed and look forward to seeking more of your magnificent post. Also, I’ve shared your website on my social networks!
Abcya games to play right now
friv com only the best online games Jogos juegos
https://frivland.blogspot.com/2021/07/hand-spinner-spin-and-stay-in-ring-as.html

Anonymous said...
23 September 2021 at 02:20

I enjoyed it, thanks for posting it. I hope this post of yours will be more appreciated because it is really excellent.
Super Friday Night Funki sport game 4 boys
Stickman Master Bow best game 4 free
Gary's World games 4 kids
zoxy3play.blogspot.com

Post a Comment