• Add-ons
  • Blog
  • Resources
    • Documentation
    • FAQs
    • Code snippets
    • Use cases
    • Support
  • Account
    • My account
    • Checkout
    • Cart
  • English
  • French
  • Add-ons
  • Blog
  • Resources
    • Documentation
    • FAQs
    • Code snippets
    • Use cases
    • Support
  • Account
    • My account
    • Checkout
    • Cart
  • English
  • French
home/Knowledge Base/Code snippets/Sidebar: disable sliding hover effect

Sidebar: disable sliding hover effect

283 views 0 April 13, 2021

You will notice that the WP Customer Area is hiding when you reduce the screen size to tablet sizes. You can disable this effect by just using this simple code snippet into a WP plugin or into your theme functions.php file.

since: 7.2.0

if ( !function_exists('custom_cuar_disable_sliding_sidebar'))
{
	/**
	 * Add a body class to disable hover effect on sidebar
	 * @param $classes
	 * @return array
	 */
	function custom_cuar_disable_sliding_sidebar($classes)
	{
		$classes[] = 'disable-tray-rescale';
		return $classes;
	}

	add_filter('body_class', 'custom_cuar_disable_sliding_sidebar');
}

Was this helpful?

Yes  No
Related Articles
  • Custom admin notification’s recipients
  • Disable CSS resets and allow integration of third party plugins
  • Automatically add a user to a group
  • Changing the default page shown by the Customer Area
  • Changing the page shown after logout
  • Sidebars: how to disable them

Didn't find your answer? Contact Us

Knowledge base
  • Code snippets 25
  • Use cases 2
  • Community links 5
FAQ
  • About licences 7
  • Pre-sales questions 3
  • After-sales questions 1
  • Plugin usage 8
  • Technical questions 10
  • Payments 4
Documentations
  • Getting started
  • Using code snippets
  • The template system
  • Full documentation
Support
  • Pre-sales Enquiries
  • Main plugin support
  • Premium add-ons support
  • Feature Requests

  Change private files attachment order

Collections: list view by default instead of grid  

  • Terms and conditions for sales
  • Refund policy
  • Privacy Policy
  • Legal notices
  • Copyright 2021 wp-customerarea.com. All Rights Reserved.