Display a custom field rating system in the front end

You are already doing what you need to do, but in another context.

$value = get_post_meta($post->ID, 'rating', true);

Take that value and format it for display.

Edit: I installed your whole block of code. You are storing you key, not your ratings value. You need to access that $ratings array again to pull the value.

$ratings = array(
    1 => ' G ',
    2 => ' PG ',
    3 => ' R ',
);

if (!empty($ratings[$value])) {
  echo '<p>Content Rating : '.$ratings[$value].'</p>';
} else {
  echo '<p>Content Rating : Unrated</p>';
}

However, even before I spotted the problem I was seeing content echo. “Content Rating: 1” instead of “Content Rating: G”. I don’t know why you claim to see nothing. If you still see nothing, something is wrong but not with this code.

I made no changes to your original block of code.