Wrap a field in html from template I have an Article content type that has related_news field. It displays inside the article text as a box.

In node--article.tpl.php I have the following code:

&lt;?php
  // We hide the comments and links now so that we can render them later.
     hide($content['comments']);
     hide($content['links']);
     hide($content['field_addthis']);    
     print render($content);
?&gt;


I found that I can hide the related_news field using hide as:

hide($content['field_related_news']);


Is there any function like hide that could able to wrap the that field in custom HTML like &lt;div class="custom"&gt;...&lt;/div&gt;?

I tried the following:

//$content['field_related_news'] = "***". $content['field_related_news']."***";


But it causes to hide the field from the node.
You can achieve this by creating field tpl file.

Refer field.tpl.php

Create tpl file named as field--field_related_news.tpl.php