0

If I use drupal_get_title() I can print the title of the page to the page body. Custom content types that I'm using have many fields like subtitle, url redirects, etc. How would I go about printing those to the page body just like drupal_get_title() allows me to do for the page title?

I've reviewed the forum for other solutions. field_get_items() and $content['field_name'] aren't working for me. I think what I want to do is simple but most of the examples pertain to database manipulation.

  • Please update the question with your code you are attempting. – Kevin Dec 13 '16 at 18:34
0

Maybe print $content['field_MACHINE_NAME']['und'][0][taxonomy_term]->name;? That should print the field without the HTML

If you want the HTML, trying using print render($content['field_review_nationality'][0]);

Source

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.