It looks like the problem is with your IF statement.
if($post->ID = 142)
should be if($post->ID == 142)
(notice the 2 equals signs)
Otherwise you are just resetting the variable $post->ID to 142
It looks like the problem is with your IF statement.
if($post->ID = 142)
should be if($post->ID == 142)
(notice the 2 equals signs)
Otherwise you are just resetting the variable $post->ID to 142