Customizr

1,改foot信息,加统计。templates/parts/footer/footer_credits.php

<?php
/**
* The template for displaying the footer credits
*
*/
?>
<div id="footer__credits" class="footer__credits" <?php czr_fn_echo('element_attributes') ?>>
<p class="czr-copyright">
<span class="czr-copyright-text">© <?php echo esc_attr( date('Y') ) ?> </span><a class="czr-copyright-link" href="<?php echo esc_url( home_url() ) ?>" title="<?php echo esc_attr( get_bloginfo() ) ?>"><?php echo esc_attr( get_bloginfo() ) ?></a><span class="czr-rights-text"> – <?php _e( 'All rights reserved', 'MEFER') ?></span>
</p>
<p class="czr-credits">
<span class="czr-designer">
<span class="czr-wp-powered"><span class="czr-wp-powered-text"><?php _e( 'Powered by WP', 'MEFER') ?> </span><a class="" title="<?php _e( 'Powered by MEFER', 'MEFER' ) ?>" href="<?php echo esc_url( __( 'http://mefer.com.cn', 'MEFER' ) ); ?>" target="_blank"></a></span><span class="czr-designer-text"> – </span>
</span>
<script type="text/javascript" src="https://s5.cnzz.com/z_stat.php?id=1276775206&web_id=1276775206"></script>
</p>
</div>

2,functions.php加函数去掉筛选\ 隐藏价格、购物车,

//Hide price
add_filter( 'woocommerce_get_price_html', 'woocommerce_hide_price' );
function woocommerce_hide_price( $price ){
    return '';
}

//Hide buy button
add_action( 'init', 'woocommerce_hide_buy_button' );
function woocommerce_hide_buy_button(){
    remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
}

//Hide products loop
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );

3,woocommerce  不显示相关产品,将下面的代码添加到主题【自定义 css】里面

.related.products, .upsells.products {
display: none;
}

如果不起作用就使用:

.related.products, .upsells.products {
display: none!important;
}

4, woocommerce 取消排序

//Hide products loop
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据

跳至工具栏