I have a content type including two fields: First name(node title) and Last name(text field)
In node.tpl I want to print first name and last name sequentially.
I use the following code to do this but it prints first name and last name in seperate lines.That’s because last name is wrapped in a div.Is there any way to get raw text of the last name field?
<?php print $node->title . render($content['field_last_name']);?>
Try this out:
Simply replace the ‘field_phone_number’ with ‘field_last_name’. You can do the same for the first name too.