Article

Drupal 7: How to print content but hide certain fields in TPL template files

Normally, templates come in default by printing all content fields by:

<?php print render($content); ?>

But if for some reason, you wish to display everything, yet you need to exclude or omit certain field values from displaying, you may want to use:

<?php

hide($content['field_image']);

print render($content);

?>

In above example this will output everything by default, yet hide the image of the node.