在“footer.php”檔案中的“wordpress”網站上是以下腳本。
<?php
/**
* The template for displaying the footer
*
* Contains the closing of the "site-content" div and all content after.
*
* @package WordPress
* @subpackage Puca
* @since Puca 1.3.6
*/
$active_theme = puca_tbay_get_theme();
get_template_part( 'footer/themes/'.$active_theme.'/footer' );
我需要</body> 在這個目錄的檔案之前插入一個腳本。
'footer/themes/'.$active_theme.'/footer/'
如何使用回聲來做到這一點?例子
echo( 'footer/themes/'.$active_theme.'/footer', '<script src="//code.tidio.co/n.js" async></script>
' );
uj5u.com熱心網友回復:
您的問題需要更多資訊。
根據您的問題,也許這就是您要找的東西?
<?php
/**
* The template for displaying the footer
*
* Contains the closing of the "site-content" div and all content after.
*
* @package WordPress
* @subpackage Puca
* @since Puca 1.3.6
*/
$active_theme = puca_tbay_get_theme();
echo '<script src="//code.tidio.co/n.js" async></script>';
get_template_part( 'footer/themes/'.$active_theme.'/footer' );
未測驗。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/405234.html
標籤:
