The difference between get_option('home') and bloginfo('url') (2 posts)

  1. Aldi
    Posted 6 years ago #

    I was just wondering if anybody knows the difference between get_option('home') and bloginfo('url')...

    They seem to produce similar results.

    Can anyone explain?


  2. Eric Mann
    Posted 6 years ago #

    In the majority of cases they produce the same results. The only difference occurs when you are using a shared hosting setup with certain providers. I used to host with 1and1 Internet, and my 'home' and 'url' entries pointed to different locations - one to the actual hosting package url (...onlinehome.us/..../blog) and one to the real url (www.mydomain.com/blog).

    The other situation is when you want to have your blog at the root of your website (www.mydomain.com) but don't want to clutter the root directory with all of the WordPress stuff. See this document for more details.

Topic Closed

This topic has been closed to new replies.

About this Topic