Cleaner way to access custom fields in code?

I would write a function to handle the monotony of this task.

function my_print_meta($id, $key, $alternate="")
{
    if($value = get_post_meta($id, $key, true))
        echo $value;
    else
        echo $alternate;
}

Notice in the function that I only call get_post_meta once and store the value in a variable so that two separate database queries don’t need to be made. With this function set, I would then call it in a template file using:

my_print_meta(get_the_ID(), 'survey_home_type', 'No Home Type');

Now, realize that this function, with the way that it manages the “alternate” text might not work for your template, but this is just an idea to get you going

techhipbettruvabetnorabahisbahis forumueduseduedueduedusedueduedusedusedu