Remove WordPress iNove theme sidebar using custom fields
I’m using WordPress iNove theme v.1.4.6 and i needed a way to hide the sidebar for a specific post so i dove in the iNove theme code and figured out how to do this with the minimum changes to the original theme code.
First open the iNove theme ‘header.php’ file using your favorite editor, usually found at <wp install folder>/wp-content/themes/inove/header.php.
Now look for this piece of code (starting from the top of the file):
... some code ...
$feed = 'http://' . $options['feed_url'];
}
} else {
$feed = get_bloginfo('rss2_url');
}
?>
Now append at the end of that code the following snippet:
<?php
global $wp_query;
if( get_post_meta( $wp_query->post->ID, 'nosidebar', 'true') ){
$inove_nosidebar = true;
}
?>
You should get some thing like this:
... some code ...
$feed = 'http://' . $options['feed_url'];
}
} else {
$feed = get_bloginfo('rss2_url');
}
?>
<?php
global $wp_query;
if( get_post_meta( $wp_query->post->ID, '', 'true') ){
$inove_nosidebar = true;
}
?>
<html xmlns="http://www.w3.org/1999/xhtml">
Now when you need to disable the sidebar in a post you simply add a new ‘Custom Field’ named ‘nosidebar’ and set it’s value to ‘true’ like you see in the figure.
Et voilà, all done!

Thanks a lot man, this was REALLY helpful. To think, after so much splicing and cutting and butchering, that there was such a simple solution all along! C’est la vie.
I tried this and triple checked every detail but as soon as I add this to my header.php it removes sidebar from every page. Not just the one I enter the custom field on.
@Sandy It’s strange since my solution works for me and Josh, but you can send me your header.php file to blog (at) unsignedint (dot) and i will have a look at it.
@lmmendes
Header sent .. it removes the sidebar from all pages as soon as i add the code to the header .. without even using a custom field to any page.
@Sandy
Hello Sandy, i made a mistake in the code last time i edit the post and didn’t test the new updated solution, already sent you the answer, via e-mail and updated the post with the correct code.
The problem was that i used the function “get_post_custom” instead of “get_post_meta”.
I hope that the works for you.
@lmmendes
Thank you!! Got it working fine now.
Hey man, thanks a lot!
Greetings from Istria!
Hello!
Nice post!
If somebody needs merely to get the iNove’s sidebar smaller, just read the following article – http://dotnetfollower.com/wordpress/2010/12/get-the-smaller-sidebar-of-inove-theme/
Thanks!