WooCommerce revisions

Hi there, do you have ideas for how I can fix these two issues with my X Classic site with WooCommerce?

Issue #1
I have a site that needs the sidebar to appear above/before the content on small devices. I’m told it’s an X theme thing that sidebars (even when they are on the left side of the page layout) appear AFTER a page’s content.

In this case, I need it to be before the content so the Product Categories drop down menu comes before the products on mobile - it’s a Woo page.

See here:

Issue #2
I need to turn off the standard WooCommerce sorting box above the products. For example, “sort by price: low to high.”

Both issues are for the same site running the latest X theme classic and WP core. Everything is updated.

Thank you!
Dawn

Hello There,

Thank you for the very detailed post information.

1.) To make sure that the sidebar appears first above the content in smaller screens, please add this JS code in the Theme Options > Global JS (http://prntscr.com/evswzb)

(function($){
  $(document).ready(function(){
    var W = $(document).width();

    if ( W < 980 ) {
      $('.x-sidebar').insertBefore( $('.x-main') );
	}
  });
})(jQuery);

2.) And to remove the sort filter in your shop page, please add the following code in your child theme’s functions.php file

// remove default sorting dropdown
 
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );

We would loved to know if this has work for you. Thank you.

You are my hero! Both of these worked perfectly!!!

Thanks so much!
Dawn​

No worries Dawn.
I am just very glad that the code works out for you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.