Tuesday, March 19, 2013

Widgets

0

How to Highlight Author Comments in Blogger

  • Tuesday, March 19, 2013
  • Unknown
  • tutorial to highlight author comments
    Commenting most important in blogger as the main way of reaching the visitors to extent as reply is another one as we all bloggers will do.For that we had already shared the threaded comments for blogger for this  visitors want to differentiate the comments from authors differently.Now we share to customize author comments by just applying CSS codes.

    Back up your template before proceeding further

    Adding Author Comment CSS code to Blogger Template

    • Log in to Blogger.
    • Then edit Template and click proceed.
    • Then search for ]]></b:skin> 
    • Then above that add below code.
    .comment-body-author {
        background: #CEF6E3;
        border: 2px solid #FA5858;
        padding: 5px;
    }
    Change the background and border color as per your blogger template.

    Adding Author comment XML code to Blogger Template

    Now we want to differentiate the author comment and visitors comments so we use If conditional statement for this can be done by adding the below xml code to template.

    • Now search for <data:comment.body/>
    • Then copy that block of if code that will look like below code
    <dd class='comment-body'>
    <b:if cond='data:comment.isDeleted'>
    <span class='deleted-comment'><data:comment.body/></span>
    <b:else/>
    <p><data:comment.body/></p>
    </b:if>
    </dd>
    • Then replace the above block of code with the below code.
    <b:if cond='data:comment.author == data:post.author'>
    <dd class='comment-body-author'>
    <p><data:comment.body/></p>
    </dd>
    <b:else/>
    <dd class='comment-body'>
    <b:if cond='data:comment.isDeleted'>
    <span class='deleted-comment'>
    <data:comment.body/></span>
    <b:else/>
    <p><data:comment.body/></p>
    </b:if>
    </dd>
    </b:if>

    That's it you have done all now save the template. Have any problem comment below.

    0 Responses to “ How to Highlight Author Comments in Blogger ”


    *Important - If you want to be informed of any replies to your comment, check the "Subscribe By Email" before submitting. Please Do Not Spam

    Post a Comment