WordPress.org

Ready to get started?Download WordPress

Forums

How to change domain in variables like get_bloginfo('stylesheet_url') ? (9 posts)

  1. clinton4
    Member
    Posted 5 years ago #

    Hi,

    Variables like get_bloginfo('stylesheet_url') get the domain that is defined in the database. How can i change variables like this to rather get the domain info from $_SERVER['HTTP_HOST']; ?

  2. Shane G
    Member
    Posted 5 years ago #

    Hi,

    Have a check with this:

    http://codex.wordpress.org/Function_Reference/get_bloginfo#Blog_Title

    Thanks,

    Shane G.

  3. clinton4
    Member
    Posted 5 years ago #

    This information is not related to my problem.

  4. adamh
    Member
    Posted 5 years ago #

    In wp-config.php, add the following line:

    define('WP_HOME', 'http://e' . $_SERVER['HTTP_HOST'] . '/wordpress');

  5. clinton4
    Member
    Posted 5 years ago #

    Did not work.

  6. adamh
    Member
    Posted 5 years ago #

    There shouldn't have been an e in there

    define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/wordpress');

    If it's not working, maybe try reading the codex?

  7. clinton4
    Member
    Posted 5 years ago #

    I noticed the e and removed it, but it did not work. I have looked in the codex, but there is nothing in there. Not that i could find anyway.

    Thanks for your reply.

  8. adamh
    Member
    Posted 5 years ago #

  9. clinton4
    Member
    Posted 4 years ago #

    Thanks, i had missed that one :)

Topic Closed

This topic has been closed to new replies.

About this Topic