Drupal Remove divs from rendered fields

<?php $fielditems = field_get_items('node', $node, 'field_name'); //print_r($fielditems); $individualitem = array_shift($fielditems); $entity = $individualitem['entity']; print_r($entity->title); //print render($fieldvalue); ?>

1 Response

This removes the div wrappers from the custom fields created in content types. I left the multiple commented print_r so I can spit out the array and see which fields are named what.

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.