如何为 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 主题

文章没看懂?代码不会用?需要帮助您可以去论坛提问自助服务台

作者小新

大象、大象 ,你的鼻子怎么那么长 ,妈妈说鼻子长才是漂亮 ......