According to Rendering Drupal 7 fields (the right way), the correct way to render fields is with code similar to the following one.
$node = node_load($nid); $field = field_get_items('node', $node, 'field_name'); $output = field_view_value('node', $node, 'field_name', $field[$delta]);
This is for rendering node fields.
I am using the Paragraphs module which lets you create custom bundles in the predefined "paragraph" entity. I could use entity.tpl.php to override the output of Paragraph module fields.
I want to print my fields that are stored in the entity, but the above code won't work because it is for nodes.
What is the code for a generic entity's field?