Hide Sidebar in responsive mood


Author Message
Damy

Posted: 9/25/2014
Quote message 

Hello there,

How to hide sidebar in responsive mood ? .. Help

Thanks
 
calsnoboarder

Posted: 9/25/2014
Quote message 

There are plugins that do that... if you are a decent php/html coder, you could create a @media variable to not display the sidebar. Or you could do something like this (haven't tested this so beware... don't try this on a live site... try it on a dev site first):

<?php if (wp_is_mobile() )

{
//it is a mobile device, you might want to add something
}
else
{
//it is not mobile, add your sidebar code here so the sidebar will appear only on big screens.
}
?>

 
Damy

Posted: 9/25/2014
Quote message 

@calsnoboarder thanks .. but it doesn't work that way!!