Show another sidebar in mobile view

Hello all,

I would like to show another sidebar in mobile view for my website’s blog ?

First, I tried to remove the sidebar in mobile view with this solution.

It doesn’t work. So, have you got any other solution for my question ?

Best regards from France,
Jadranko :slight_smile:

Hi Jadranko,

Thanks for writing in!

The code does not work because it does not apply to your site. I would recommend this code instead:

@media ( max-width: 979px) {

	.x-container .x-sidebar.right {
	   display: none;
	}

	.x-main {
	   float: none;
	   width: 100%;
	}

}

Hope this helps. Please let us know how it goes.

Hi RueNel,

Thanks for your answer but… this code will hide the sidebar, no ?

Is it possible to just show another sidebar in mobile view ?

I would like to show another sidebar with different widgets only in mobile view, if it’s possible ?

Thanks :slight_smile: :slight_smile:

Hello Jadranko,

Yes the code will Please understand that WordPress will display one sidebar or widget area for a page. Regretfully you cannot display different sidebars for different screens. You could probably display sidebar and insert the widgets you’d need to display. With a little custom css, you can hide or show the widgets that you want to display desktop or mobile screens instead.

Hope this make sense.

Thanks for your answer @RueNel !

So… Is It possible to have an exemple about the code I need to use to hide a sidebar’s widget on mobile view ?

Thanks a lot ! :slight_smile:

Hi Richard,

Yes, it should hide the sidebar on mobile view, and smaller tablet view.

Thanks!

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