0

I have a issue. I created a field in "content types > article". Then I went to node.tpl.php and added next code:

<?php print render($content['field_like']); ?>

after that, I cleared cache and saw double field in my article. I tried to hide this field in "manage display" but it didn't successful, my field disappeared at all.

I just want to render my field in a certain place in the node.tpl.php

1 Answer 1

1

Try wrapping the field in the hide function.

hide($content['field_like']);

Do this after you have output your field but before you call render($content).

see https://api.drupal.org/api/drupal/includes%21common.inc/function/hide/7.x

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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