0

I have added the following to my node.tpl

<?php if ($display_submitted): ?>
 <?php print $user_picture; ?><?php print $name; ?>
<?php endif; ?>

This displays the authors info on the node itself, but also the teaser. How do I change the code to remove it from the teaser, but still keep it on the node?

0

Just pop an if ($page): condition around it:

<?php if ($page): ?>

  <?php if ($display_submitted): ?>
    <?php print $user_picture; ?><?php print $name; ?>
  <?php endif; ?>

<?php endif;?>

In the context of node.tpl.php $page is defined on the docs page as a:

Flag for the full page state.

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.