Search code examples
javascripthtmlfacebooktwitterblogger

How to call an URL into HTML instead of <a href="">?


I want to put social links to author box in blogger, There is many of authors in the blog, Google call the Google+ profiles by the code :

expr:href='data:post.authorProfileUrl' 

Instead of <a href="">

The problem is I just can add one fb or twitter author profile by using <a href=""> . Is it an solution to give the authors social links an ID and call it into the HTML ?

The Blogger Author box code :

<li><a class='external external-link' href='#' rel='nofollow' target='_blank'><i class='fa fa-facebook'/></a></li>

<li><a class='external external-link' href='#' rel='nofollow' target='_blank'><i class='fa fa-twitter'/></a></li>

<li><a class='external external-link' expr:href='data:post.authorProfileUrl' rel='nofollow' title='Google+' target='_blank'><i class='fa fa-google-plus'/></a></li>

Solution

  • There is no way to get author social links other than Google+ from Blogger but you can check by author using a conditional statement and display certain content with particular author

    <b:if cond='data:post.author == "first author name"'>
      <!-- first author social links -->
    <b:elseif cond='data:post.author == "second author name"'>
      <!-- second author social links -->
    </b:if>