Forums
Home / Fixing WordPress / Disable sidebar with mobile max-device-width
(@cableghost)
9 years, 8 months ago
I would like to disable the sidebar in mobile mode from within the php template with max-device-width; something like the below. What would be appropriate code for this?
<?php if (wp_is_mobile() ) and (max-device-width: 720) { //do nothing } else { < ? php get_sidebar(); ? >; } ?>
see here for solution: http://bit.ly/XVSCcB