如何删除/自定义 storefront 主题页脚的 Storefront designed by WooCommerce 字样和链接?

正在查看 3 个帖子:1-3 (共 3 个帖子)
  • 作者
    帖子
  • 诗语
    管理员
    • 文章数量: 5,942
    发帖数:9997
    楼主
    @feibisi

    storefront 主题是 WooThemes 出品的 WooCommerce 商店主题,我们做了中文版的,所以需要调整下页脚的链接,因为这些主题都是 GPL 授权的,改主题代码和页脚都是允许的,在 wordpress.org 找到了解决方法如下:

    2016-06-26 10.11.46

    将以下代码加入到你的子主题中:

    // 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

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

    诗语
    管理员
    • 文章数量: 5,942
    发帖数:9997
    楼主
    @feibisi

    原帖地址:https://wordpress.org/support/topic/how-to-remove-remove-designed-by-woothemes-from-footer

    诗语
    管理员
    • 文章数量: 5,942
    发帖数:9997
    楼主
    @feibisi

    优化主题去掉 Google 字体的方法:

    // END ENQUEUE PARENT ACTION
    
    function wpse_dequeue_google_fonts ()  { 
        wp_dequeue_style (  'storefront-fonts'  ); 
    } 
    add_action (  'wp_enqueue_scripts' ,  'wpse_dequeue_google_fonts' ,  99  );
    
    

    来源:https://stackoverflow.com/questions/29134113/how-to-remove-or-dequeue-google-fonts-in-wordpress-twentyfifteen

正在查看 3 个帖子:1-3 (共 3 个帖子)
  • 话题 「如何删除/自定义 storefront 主题页脚的 Storefront designed by WooCommerce 字样和链接?」 已关闭,不接受新回复。

话题信息