0

im trying to remove parent style on my sites theme (Shopper WP) on the On Sale Product Grid. This is because I have added some carousels and wish to keep the same format. Any idea on how I can force to remove the theme out of it or copy the styles from the other one? This code is ran by hooks and was able to change some stuff like the limit from 4 to 12. But I really want to remove the style of this grid. Let me know if this is enough or if you need more information. Thanks!!

if ( ! function_exists( 'shopper_on_sale_products' ) ) {
/**
 * Display On Sale Products
 * Hooked into the `homepage` action in the homepage template
 *
 * @param array $args the product section args.
 * @since  1.0.0
 * @return void
 */
function shopper_on_sale_products( $args ) {

    if ( shopper_is_woocommerce_activated() ) {

        $args = apply_filters( 'shopper_on_sale_products_args', array(
            'limit'   => 12,
            'columns' => 4,
            'title'   => __( 'On Sale', 'shopper' ),
        ) );

        echo '<section class="shopper-product-section shopper-on-sale-products" aria-label="On Sale Products">';

        do_action( 'shopper_homepage_before_on_sale_products' );

        echo '<h2 class="section-title"><span>' . wp_kses_post( $args['title'] ) . '</span></h2>';

        do_action( 'shopper_homepage_after_on_sale_products_title' );

        echo shopper_do_shortcode( 'sale_products', array(
            'per_page' => intval( $args['limit'] ),
            'columns'  => intval( $args['columns'] ),
        ) );

        do_action( 'shopper_homepage_after_on_sale_products' );

        echo '</section>';
    }
}

}

  • Check the theme files for wp_enqueue_script() calls. If you have them, you can wp_dequeue_script() with the same handle – kero Jan 6 at 18:55
  • Im new to this, so exploring how to put this code, once i have done it I'll let you know! THanks for the help. – Alejandro Borchers Jan 7 at 0:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.