I in the middle of creating a content type with multiple fields. All the fields need to have all the extra markup removed, except for a specific 3 and I would like these to actually be wrapped in <h3> tags.
I've copied the field.tpl file into my theme and renamed to be used just for this specific content type, which is working fine with this code:
<?php if (!$label_hidden): ?> <div class="field-label"<?php print $title_attributes; ?>><?php print $label ?> </div> <?php endif; ?> <?php foreach ($items as $delta => $item): ?> <?php print render($item); ?> <?php endforeach; ?> My trouble is that I have no idea the syntax I need to target a specific field. So I'm im guessing once I figure out how to target the specific field, I can just use:
<?php foreach (something here to find the right field): ?> <h2><?php print render($item); ?></h2 <?php endforeach; ?> What would that be if my field name was field_sizing_title?
I found the Field Wrappers Module, but it seem like overkill and I really like to learn more about how to work with the field.tpl file