Woocommerce variable products are being added to the card on the homepage (ajax)

I was trying to fix this at the last 4 hours and I got it. You need to change: ajax_add_to_cart add_to_cart_button button for this: button product_type_variable add_to_cart_button on the follow archives: wp-content/themes/tyche/inc/libraries/widgets/widget-tyche-products/view/layout-a.php wp-content/themes/tyche/inc/libraries/widgets/widget-tyche-products/view/layout-b.php wp-content/themes/tyche/inc/libraries/widgets/widget-tyche-products/view/layout-c.php wp-content/themes/tyche/inc/libraries/widgets/widget-tyche-products/view/layout-d.php Its located between lines 60~90. You need to change in every archive. Sorry for my bad English. Love the community, … Read more

Nav menus Fast previewing not working with wp_get_nav_menu_items!

You must use wp_nav_menu() if you want to get selective refresh (fast previewing). If you want to have a custom nav menu that uses selective refresh, then instead of manually iterating over wp_get_nav_menu_items() you instead need to subclass the Walker_Nav_Menu to implement your custom logic, and then pass it into wp_nav_menu() like this: wp_nav_menu( array( … Read more

Responsive Images with art direction

The ‘picture’ element supports min-width and max-width. If the image is a featured image then wp_get_attachment_image_src is what you would use: // open the picture element <picture> // use this image if the width of a screen does not go over 599px <source srcset=”https://wordpress.stackexchange.com/https://wordpress.stackexchange.com/https://wordpress.stackexchange.com/<?php echo wp_get_attachment_image_src( get_post_thumbnail_id(), ‘whatever add_image_size you want to use’, false )[0] … Read more