在woocommerce主页中隐藏自定义代码

时间:2019-01-08 01:17:14

标签: php html wordpress woocommerce

如何在首页上删除此代码

这是我的代码:

<?php 
    if(!is_home()){

   <div class="product-hover">

        <div class="product-buttons">

            <?php woocommerce_template_loop_add_to_cart(); ?>

            <?php echo mts_wishlist_button(); ?>

            <a href="#" data-product-id="<?php echo esc_attr( $product->get_id() ); ?>" class="quick-look-link button"><i class="fa fa-search"></i><span><?php _e( 'Quick Look', MTS_THEME_TEXTDOMAIN );?></span></a>

            <a href="<?php echo esc_url( get_the_permalink() ); ?>" class="button"><i class="fa fa-eye"></i></a>

        </div>

    </div> } ?>

我做错了什么?

0 个答案:

没有答案