$url = site_url( '/secrets/', 'https' ); echo $url; //Output: https://www.example.com/secrets/ or https://www.example.com/wordpress/secrets/