WordPress.org

Ready to get started?Download WordPress

Forums

Widget Context
SERVER_NAME in get_current_url() (2 posts)

  1. jamesmorrish
    Member
    Posted 3 years ago #

    Hi,

    Is there any reason the function get_current_url() is being used, instead of get_bloginfo('siteurl')??

    I ask because I often develop sites locally before transferring to a the live domain, with a URL like:

    http://localhost:8888/

    In this case, the get_current_url() function returns http://localhost/ as the current URL and the widget won't work.

    Alternatively HTTP_HOST could be used instead of SERVER_NAME.

    http://wordpress.org/extend/plugins/widget-context/

  2. Kaspars
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks for the suggestions, James. I'll try to include the "get_current_url()" call instead of get_bloginfo(), as well as HTTP_HOST in the next release.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic