Problem with widget, need help(blogger)

Discussion in 'Web Design' started by arberzylfiu, Jan 15, 2017.

  1. arberzylfiu

    arberzylfiu Registered Member

    Joined:
    Dec 16, 2016
    Messages:
    65
    Likes Received:
    13
    Gender:
    Male
    *This is post was also made in the blogging forum, but I was recommended to post it here too*
    Hello all. I am having problems with a recent posts widget. There are some numbers that appear on the posts and on the home page. I tried to find and remove them on the widget code, but I couldn't find them. It's really annoying. Please check pic and code of the widget:
    ----------------------------------------------------------------------------------------------------------------
    <script type="text/javascript">
    function showlatestpostswiththumbs(t){document.write('<ul class="recent-posts-container">');for(var e=0;e<posts_no;e++){var r,n=t.feed.entry[e],i=n.title.$t;if(e==t.feed.entry.length)break;for(var o=0;o<n.link.length;o++){if("replies"==n.link[o].rel&&"text/html"==n.link[o].type)var l=n.link[o].title,m=n.link[o].href;if("alternate"==n.link[o].rel){r=n.link[o].href;break}}var u;try{u=n.media$thumbnail.url}catch(h){s=n.content.$t,a=s.indexOf("<img"),b=s.indexOf('src="',a),c=s.indexOf('"',b+5),d=s.substr(b+5,c-b-5),u=-1!=a&&-1!=b&&-1!=c&&""!=d?d:"https://2.bp.blogspot.com/-C3Mo0iKKiSw/VGdK808U7rI/AAAAAAAAAmI/W7Ae_dsEVAE/s1600/no-thumb.png"}var p=n.published.$t,f=p.substring(0,4),g=p.substring(5,7),v=p.substring(8,10),w=new Array;if(w[1]="Jan",w[2]="Feb",w[3]="Mar",w[4]="Apr",w[5]="May",w[6]="Jun",w[7]="Jul",w[8]="Aug",w[9]="Sep",w[10]="Oct",w[11]="Nov",w[12]="Dec",document.write('<li class="recent-posts-list">'),1==showpoststhumbs&&document.write('<a href="'+r+'"><img class="recent-post-thumb" src="'+u+'"/></a>'),document.write('<div class="recent-post-title"><a href="'+r+'" target ="_top">'+i+"</a></div>"),"content"in n)var A=n.content.$t;else if("summary"in n)var A=n.summary.$t;else var A="";var k=/<\S[^>]*>/g;if(A=A.replace(k,""),1==post_summary)if(A.length<summary_chars)document.write(A);else{A=A.substring(0,summary_chars);var y=A.lastIndexOf(" ");A=A.substring(0,y),document.write(A+"...")}var _="",$=0;document.write('<br><div class="recent-posts-details">'),1==posts_date&&(_=_+w[parseInt(g,10)]+" "+v+" "+f,$=1),1==readmorelink&&(1==$&&(_+=" | "),_=_+'<a href="'+r+'" class="url" target ="_top">Read more</a>',$=1),1==showcommentslink&&(1==$&&(_+=" <br> "),"1 Comments"==l&&(l="1 Comment"),"0 Comments"==l&&(l="No Comments"),l='<a href="'+m+'" target ="_top">'+l+"</a>",_+=l,$=1),document.write(_),document.write("</div>"),document.write("</li>")}document.write("</ul>")}
    </script>
    <script type="text/javascript">
    var posts_no = 5;
    var showpoststhumbs = true;
    var readmorelink = true;
    var showcommentslink = false;
    var posts_date = false;
    var post_summary = true;
    var summary_chars = 40;</script>
    <script src="/feeds/posts/default?orderby=published&alt=json-in-script&callback=showlatestpostswiththumbs"></script>
    <a style="font-size: 9px; color: #CECECE; margin-top: 10px;" href="http://helplogger.blogspot.com/2014/11/5-cool-recent-post-widgets-for-blogger.html" rel="nofollow"></a>
    <noscript>Your browser does not support JavaScript!</noscript>
    <link href='http://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'/>
    <style type="text/css">
    img.recent-post-thumb{padding:2px;width:65px;height:65px;float:left;margin:0px 10px 10px;border: 1px solid #69B7E2;}
    .recent-posts-container {font-family:'Oswald', sans-serif;font-size:12px;}
    ul.recent-posts-container li{list-style-type: none; margin-bottom: 10px;font-size:12px;float:left;width:100%}
    ul.recent-posts-container {counter-reset: countposts;list-style-type:none;padding:0;}
    ul.recent-posts-container li:before {content: counter(countposts,decimal);counter-increment: countposts;z-index: 1;position:absolute; left: 0px; font-size: 13px;font-weight: bold;color: #fff;background: #69B7E2;line-height:25px;height:25px;width:25px;text-align:center;-webkit-border-radius: 50%;-moz-border-radius: 50%;border-radius: 50%;}
    .recent-posts-container a{text-decoration:none;}
    .recent-post-title {margin-bottom:5px;}
    .recent-post-title a {font-size:12px; text-transform: uppercase; color: #2aace3;}
    .recent-posts-details {margin: 5px 0px 0px 92px;font-size:11px;}
    .recent-posts-details a{color: #777;}
    </style>
    ----------------------------------------------------------------------------------------------------------------
     

    Attached Files:

    • 1.jpg
      1.jpg
      File size:
      218.9 KB
      Views:
      57
  2. tasburrfoot

    tasburrfoot Regular Member

    Joined:
    Dec 16, 2008
    Messages:
    332
    Likes Received:
    153
    My god - use the CODE tags next time.. Nothing worse than un-formatted code without syntax-highlighting..
     
  3. chillerfx

    chillerfx Jr. VIP Jr. VIP

    Joined:
    Mar 20, 2012
    Messages:
    260
    Likes Received:
    67
    Occupation:
    Graphic Designer, Web-dev and Digital Marketer.
    Location:
    Everywhere on net.
    Home Page:
    Hi there,

    I think this should help you.
    Add style "display:none;" for ul.recent-posts-container li:before, If it doesn't work then use "display:none !important".

    Code:
    ul.recent-posts-container li:before {
    content: counter(countposts,decimal);
    counter-increment: countposts;
    z-index: 1;
    position:absolute;
    left: 0px;
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    background: #69B7E2;
    line-height:25px;
    height:25px;
    width:25px;
    text-align:center;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    display:none !important;
    }
    
     
    • Thanks Thanks x 1
  4. arberzylfiu

    arberzylfiu Registered Member

    Joined:
    Dec 16, 2016
    Messages:
    65
    Likes Received:
    13
    Gender:
    Male
    Thank you so much! It worked like a charm and the widget looks good. Thanks :)
     
  5. chillerfx

    chillerfx Jr. VIP Jr. VIP

    Joined:
    Mar 20, 2012
    Messages:
    260
    Likes Received:
    67
    Occupation:
    Graphic Designer, Web-dev and Digital Marketer.
    Location:
    Everywhere on net.
    Home Page:
    You're welcome mate, it's great to know that it's finally working for you. :)
     
  6. MasterF

    MasterF Registered Member

    Joined:
    Jun 16, 2015
    Messages:
    54
    Likes Received:
    11
    Gender:
    Male
    would u mine if u share template name please?