WordPress/Mandigo/FAQ/How do I make sidebars disappear on a particular page

tagline

« Back to Mandigo

How do I make sidebars disappear on a particular page?

If you would like to have some pages displayed without some of the sidebar columns, you can EITHER use a custom page template, OR use a javascript snippet that will hide the column when the page loads.


Using Javascript

Add the following lines to your page in code view (not the rich text editor):

<script type="text/javascript">
	jQuery(function($) {
		$('#sidebar1').hide();
	});
</script>

If it doesn’t hide the one you expected, the other sidebar is named "#sidebar2". And if you wanted to hide both sidebar on this page, replace "#sidebar1" with ".sidebars".

Please note however that this trick should not be applied to posts, as it will also hide the sidebars on pages such as the index or the archives on which this post is displayed. If you really want to use this trick in a post, put the javascript snippet after the "more" tag.


These pieces really set a standard in the idsntury.

personaltools
sponsored links