pxforti
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] stop page scrolling to top after add to cart on category pageHi Thanks for the answer. You are correct: I added code to my theme functions.php that added product quantity inputs to the category/ products list page.
I got this code from the WooCommerce website: https://woocommerce-b2b.com/blog/add-quantity-input-in-products-list/
Unfortunately, it is this code that causes the page to reload after clicking the add to cart button on a product category page. Is there any way to keep this code AND prevent the page from reloading?
This is the code that adds the quantity function to the product category page:
====================/** * Override loop template and show quantities next to add to cart buttons */ add_filter( 'woocommerce_loop_add_to_cart_link', 'quantity_inputs_for_woocommerce_loop_add_to_cart_link', 10, 2 ); function quantity_inputs_for_woocommerce_loop_add_to_cart_link( $html, $product ) { if ( $product && $product->is_type( 'simple' ) && $product->is_purchasable() && $product->is_in_stock() && ! $product->is_sold_individually() ) { $html = '<form action="' . esc_url( $product->add_to_cart_url() ) . '" class="cart" method="post" enctype="multipart/form-data">'; $html .= woocommerce_quantity_input( array(), $product, false ); $html .= '<button type="submit" class="button alt">' . esc_html( $product->add_to_cart_text() ) . '</button>'; $html .= '</form>'; } return $html; }
Thanks
Forum: Plugins
In reply to: [WooCommerce] stop page scrolling to top after add to cart on category pageThanks. But my problem is not a redirect to cart page. My problem is that if ajax add to cart is on, then when on a category page and I click add to cart, the product is added and the cart page reloads to the top of the page rather than where I was ON the cart page.
I want the cart page to reload to where I was on the cart page; eg at the bottom of a 36 product cart page.
Hi. I have latest version of WordPress and your plugin installed. Hosting on siteground. I am using Genesis Monochrome theme.
I disabled all plugins except Editor Plus and changed theme to Twenty Twenty and still get the error.
Thanks
I might have installed it before, but I’m not sure.
Forum: Plugins
In reply to: [WooCommerce] How to get rid of new header in WooCommerce adminThanks for the quick reply. That’s exactly what I needed.
Forum: Plugins
In reply to: [Autoptimize] Can’t Remove Shortpixel Admin NoticeFYI: I have this same problem on at least a dozen sites and none of them are on siteground. They are on bluehost, hostgator, viviotech
Forum: Plugins
In reply to: [Collapse-O-Matic] Collapse-O-Matic stopped workingThanks.
I fixed it by adding this code to functions.php
add_filter( 'term_description', 'shortcode_unautop' ); add_filter( 'term_description', 'do_shortcode' ); remove_filter( 'pre_term_description', 'wp_filter_kses' );
Forum: Plugins
In reply to: [Collapse-O-Matic] Collapse-O-Matic stopped workingHi.
it’s used on a WooCommerce category description. It used to work, but after updating plugins, it no longer works.
https://gointuition.com/product-category/sessions/
I created a test page and it works on that.
Forum: Plugins
In reply to: [Collapse-O-Matic] Collapse-O-Matic stopped workingHi.
Yes, plugin installed and activated.
Turned off all caching and it still doesn’t work. Still showing only shortcode. Content not collapsed.
Forum: Fixing WordPress
In reply to: Displaying latest posts for specific tags?This plugin should do it. there are detailed instructions on how to create a shortcode
Forum: Fixing WordPress
In reply to: Remove Magnifying glass icon on product page wordpress/woocommerceAdd the following code to your theme’s functions.php file:
add_filter(‘woocommerce_single_product_image_thumbnail_html’,’wc_remove_link_on_thumbnails’ );
function wc_remove_link_on_thumbnails( $html ) {
return strip_tags( $html,'<div>‘ );
}Forum: Fixing WordPress
In reply to: Remove Magnifying glass icon on product page wordpress/woocommerceAdd this to your style.css file:
.single-product .woocommerce-product-gallery .woocommerce-product-gallery__trigger {
display: none;
}You aleady have image zoom when you click it.
Forum: Fixing WordPress
In reply to: Footer Widget playing upHi,
Your website prevents me from viewing code in the chrome or safari inspector. Without that ability, it’s pretty hard to tell what might cause the problem you are seeing.
It still displays correctly for me in chrome and safari.
Have you tried clearing your browser cache?
Forum: Fixing WordPress
In reply to: Footer Widget playing upIf you have a lot of images in your homepage slideshow, or on any page, that will slowdown the loading of that page considerably. By a lot of images, I mean more than 3 or 4. Also, have you optimized your images to cut down on file size?
Forum: Fixing WordPress
In reply to: Footer Widget playing upI tested on safari and it looks fine. Does take a while to load.