2017-06-17 72 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