Support » Fixing WordPress » adding echo in betwenn

  • Resolved fatty123


    Does it make any difference if you add/omit the word echo?

    e.g. <?php bloginfo(‘template_url’); ?>
    e.g. <?php echo bloginfo(‘template_url’); ?>

    which is correct?

Viewing 4 replies - 1 through 4 (of 4 total)
  • esmi


    Forum Moderator

    <?php bloginfo('template_url'); ?>

    It is echoed to the screen by the bloginfo() function itself.

    then how about template directory?:
    <?php echo bloginfo(‘template_directory’); ?>

    is it correct or wrong? the reason I’m asking is because I saw an online tutorial where the person add echo for all his blog info to refer to his image source.
    <img src=”<?php echo bloginfo(‘template_directory’);…… ?>”>

    Yet he preview in browser and everything works fine. So I just wondering if it is the same thing or not ><



    Forum Moderator

    Use <?php bloginfo('template_directory'); ?>. The tutorial you saw is wrong.

    Thanks =)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘adding echo in betwenn’ is closed to new replies.