li链接中的目标属性


Target attribute in li link?

我有以下链接,但它总是在同一页面打开。我想让它在新的一页打开。我已经看了一些教程,但是找不到我问题的答案。

我想实现这直接到链接,而不是页面。因为我还有其他链接,它们需要放到同一个页面

我代码:

    if( $text1 ) {
      echo '<li class="social-icons FB"><a href='.$text1.' '.$target.' data-tip="Facebook"><img width='.$imgW.'  height='.$imgh.' src='.plugins_url( '/images/'. $imgtype .'facebook.png').'></a></li>';
   }

谁能帮我写一下正确的代码?

在href..后面添加代码

target="_blank"