Modify php to exclude ID

What do I add to the code below if I want to exclude the “get_post_meta” for some IDs? Let’s say that I have posts with IDs 1, 5, 7 and I want the following code to work but to not return and display meta for those particular IDs? Filling in for our PHP guy and need to try and make this happen in his absence. Any help is appreciated.
[php]
$layout = get_post_meta($post->ID, ‘_layout’, true);
if(empty($layout) || $layout == ‘default’){
$layout=theme_get_option(‘blog’,‘single_layout’);
}
[/php]

[php]
if (($post->ID != 1) || ($post->ID != 5) || ($post->ID !=7)) {

$layout = get_post_meta($post->ID, '_layout', true);
    if(empty($layout) || $layout == 'default'){
    $layout=theme_get_option('blog','single_layout');
    }

}
[/php]

Is this for Wordpress? Might be cleaner to add a category to filter on instead of individual post IDs… just a thought.

Sponsor our Newsletter | Privacy Policy | Terms of Service