在我的wordpress安装中使用functions.php可以让我编辑主题的页脚部分。然而,我试图在使用标准<a href= ...
的文本中添加一个链接,但这会使网站崩溃。
这是我现在正在处理的:
function my_footer_info() {
$my_footer_info = '<div class="copyright">'.__( "For programs and periodization, click here.</br> Copyright © ", 'spacious' ).' 2016 site.html'.'</div>';
echo do_shortcode( $my_footer_info );
这工作和文本是可见的网站上没有问题。但是,添加这个会使站点崩溃:
<a href = "site.html" > click here < /a >
任何帮助都非常感谢!
你可以在functions.php中这样做
钩子在你自己的函数中,比如:
add_action( 'REPLACE YOUR WEBSITE NAME HERE_footer, 'my_footer_content' );
function my_footer_content()
{
echo '<div class="copyright">'.__( "For programs and periodization,
click here.</br> Copyright © ", 'spacious' ).' 2016 site.html'.'</div>';
}