- This topic has 1 reply, 2 voices, and was last updated 5 years, 11 months ago by .
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
Hi guys !
I'm using simple sidebar plugin to display specific sidebar (only) on my home page.
I would like remove this sidebar on small screen resolutions like mobile phone.
I would to know if it could be possible to use conditionnal code instead of css media queries ?
Thanks for helping.
Yes it's possible, but it could get complicated. Conditional code typically executes in PHP on the server. You would have to find a plugin or library that would allow PHP to determine the remote device and then conditionally hide the code. You could also do it in jQuery, which would be easier, but then you would only be using jQuery to apply CSS or hide the element with jQuery.hide().
© 2022 WPEngine, Inc.