Difference between bloginfo() and get_bloginfo()? (3 posts)

  1. f00bar
    Posted 6 years ago #

    In my mind, these two tags do the same thing..? I'm kind of confused by all the repeating tags and arguments in WordPress (especially the get_categories() function - why are there so many objects that show the exact same thing??).

    Just would like to know if anyone knows the major difference and whether one tag is better? I've been using get_bloginfo() a lot to retrieve my template URL, but the header file tends to use just bloginfo() to get the same thing...

    Any thoughts?

  2. esmi
    Forum Moderator
    Posted 6 years ago #

    get_bloginfo does what it says on the box. It gets data on the blog for use in your templates. bloginfo() does the same thing but automatically echoes the result to the screen/page.

  3. f00bar
    Posted 6 years ago #

    So, technically, it's better to use bloginfo() when placing links/urls on the page as you don't need to write echo...I see. Thanks for clearing that up!

Topic Closed

This topic has been closed to new replies.

About this Topic