XF 1.2 Remove sidebar on certain pages?


Active member
How would I go about removing the sidebar on certain pages. I found out how to do it globally but not on specific pages.

.sidebar {
display: none;

.mainContent {
margin-right: 0;

How would I specify a specific page?


XenForo moderator
Staff member
Add the page class to the selector, e.g. .forum_list .sidebar

The FAQ in my signature explains how to check the template name for the page you're on.


Active member
Ah. Maybe what I really need to do is remove the user infoblock in the side bar.
That's what that code does.
Then it must be an issue with XenPorta. I removed the sidebar but the portal index is still the width it would normally be if there was a sidebar there.