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:
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.
- The topic ‘[Plugin: Widget Context] SERVER_NAME in get_current_url()’ is closed to new replies.