I am trying to add a Wordpress admin menu item that will point to a URL which is
http://docs.[currentdomain]
My plugin code is currently:
function user_manual() {
add_menu_page(
__( 'Custom Menu Title', 'textdomain' ),
'Manual',
'manage_options',
'http://docs' . home_url(),
'',
'dashicons-book-alt',
1
);
}
add_action( 'admin_menu', 'user_manual' );
But what I end up with is currently: http://docshttp/www.domain.com
How can I achieve this without hardcoding the domain name in?