Have you tried printing get_post_meta($post->ID, 'wider_text_column', true); to confirm you actually have a value for that custom field for the post?
I got this working with is page…
<div class="faq <?php
if ( is_page (array('privacy-policy','index',)) ){
$margin= 'widerColumn"';
echo $margin;
}
?>
but ideally I need this to be determined by custom field so that its content managed and not hardcoded.
Actually I found a handy link here that sorted this all very easily by defining a new function:
http://www.nathanrice.net/blog/an-easy-way-to-get-the-contents-of-a-custom-field/
Just added this to functions.php
function get_custom_field($key, $echo = FALSE) {
global $post;
$custom_field = get_post_meta($post->ID, $key, true);
if ($echo == FALSE) return $custom_field;
echo $custom_field;
}
and this to my template where I needed this applied.
<?php if(get_custom_field('dark_background')) { ?>
class="darkerBackground"
<?php } ?>