如何為 Storefront 主題修改頁腳鏈接,去掉 Built with Storefront & WooCommerce.

如何為 Storefront 主題修改頁腳鏈接,去掉 Built with Storefront & WooCommerce.

如何刪除/自定義 Storefront 主題頁腳的 Built with Storefront & WooCommerce. 字樣和鏈接? 過去一段時間為 Storefront designed by WooCommerce. 或者 designed by WooThemes .

Storefront 主題是 WooCommerce 的默認商店主題,薇曉朵做了中文版的,所以需要調整下頁腳的鏈接,因為這些主題都是 GPL 授權的,改主題代碼和頁腳都是允許的,在 wordpress.org 找到了解決方法如下:

將以下代碼加入到您的子主題 functions.php 文件中:

// Remove WooThemes Credit from Footer
add_action( 'init', 'custom_remove_footer_credit', 10 );
function custom_remove_footer_credit () {
    remove_action( 'storefront_footer', 'storefront_credit', 20 );
    add_action( 'storefront_footer', 'custom_storefront_credit', 20 );
} 
function custom_storefront_credit() {
	?>
	<div class="site-info">
		&copy; <?php echo get_bloginfo( 'name' ) . ' ' . date( 'Y' ); ?>
	</div><!-- .site-info -->
	<?php
}

修改好的效果:

2016-06-26 11.48.15

其他文字什麼的也可以自己添加。


薇曉朵 Storefront 中文版 WooCommerce 主題針對國內用戶進行了多項優化,使用更方便省心,購買地址:

Storefront | 店面 商店 商店 中文版 WooCommerce 主題

文章沒看懂?代碼不會用?需要幫助您可以去論壇提問自助服務台

作者小新

大象、大象 ,你的鼻子怎麼那麼長 ,媽媽說鼻子長才是漂亮 ......