Tagged: cart page
Viewing 4 posts - 1 through 4 (of 4 total)
-
AuthorPosts
-
January 25, 2025 at 10:16 pm #1475794January 25, 2025 at 11:06 pm #1475796
Hey marketbiz,
To remove the new products section on the empty cart page add this css to your Quick CSS:.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wp-block-product-new,.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wp-block-heading:not(.wc-block-cart__empty-cart__title) { display:none; }
Then to add the button add this code to the end of your child theme functions.php file in Appearance ▸ Editor:
function custom_script() { ?> <script> (function($){ var button = $('<div class="avia-button-wrap av-m6cpztd3-7c60bd307536e2939b17d69a432c4593-wrap avia-button-center avia-builder-el-56 el_after_av_button avia-builder-el-last "><style type="text/css" data-created_by="avia_inline_auto" id="style-css-av-m6cpztd3-7c60bd307536e2939b17d69a432c4593">#top #wrap_all .avia-button.av-m6cpztd3-7c60bd307536e2939b17d69a432c4593{border-radius:20px 20px 20px 20px;transition:all 0.4s ease-in-out;}#top #wrap_all.avia-button.av-m6cpztd3-7c60bd307536e2939b17d69a432c4593:hover .avia_button_background{border-radius:20px 20px 20px 20px;}</style><a href="#" class="avia-button av-m6cpztd3-7c60bd307536e2939b17d69a432c4593 av-link-btn avia-icon_select-no avia-size-x-large avia-position-center avia-color-dark" title="Dashboard" aria-label="Dashboard"><span class="avia_iconbox_title">Dashboard</span></a></div>'); if ($("body").hasClass("woocommerce-cart") && $(".wp-block-woocommerce-empty-cart-block .wc-block-grid").hasClass("wp-block-woocommerce-product-new") == true) { $(button).appendTo('.wp-block-woocommerce-cart'); } else {} })(jQuery); </script> <?php } add_action( 'wp_footer', 'custom_script', 99 );
Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
Then adjust the button URL to suit.
Best regards,
MikeJanuary 26, 2025 at 9:05 am #1475806Perfect!
Thank you, I reallly appreciateJanuary 26, 2025 at 1:17 pm #1475816Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
- The topic ‘Need help removing New Product section from empty cart page’ is closed to new replies.