2017-06-17 116 views
-1

我有一个WordPress主题,允许我添加特定的信息和链接。我有一些代码来管理链接到一个网址。目前链接在同一个标​​签中打开,意味着用户离开我们的网站。我需要链接在新标签中打开。不是一个PHP开发人员我不知道如何做到这一点需要一些帮助。下面是代码:PHP中的重定向链接

<?php if ($launch) : ?> 
      <div class="project-view"> 
       <strong><?php _e('Standard', 'themify'); ?></strong> 
       <a href="<?php echo esc_url($launch); ?>"><?php _e('View Standard', 'themify'); ?></a> 
      </div> 
    <?php endif; ?> 

感谢

回答

-1
<?php if ($launch) : ?> 
     <div class="project-view"> 
      <strong><?php _e('Standard', 'themify'); ?></strong> 
      <a href="<?php echo esc_url($launch); ?>" target="_blank"><?php _e('View Standard', 'themify'); ?></a> 
     </div> 
<?php endif; ?> 
+0

真棒 - 感谢 – gillers322