Get just the domain name $_SERVER[‘HTTP_HOST’] gives you the domain name through which the current request is being fulfilled Get site URL Get full page URL (domain name + page + any arguments) Page URL (With Arguments) Stripping Page URL Get URL without the domain name Getting URL without the arguments Getting just the URL […]
Category: URL’s
WordPress Paths
WordPress root Homepage URL Reirect to a page Site WP install URL The URL of the WordPress install. Usually identical to using site_url(), but not necessarily! User home_url() generally. URL to WP admin area For ap-admin you should use site_url(), thats the correct usage! WordPress root – Server filesystem WordPress Theme get_stylesheet_directory_uri() is better because […]
