If you have Custom Link URL exactly as written in your example, it should work as expected. “https://wordpress.stackexchange.com/” at the beginning already means “site root”, and it should work on single (first) click. Maybe you have some menu related plugin installed, or your theme changes menu URLs in some way. Or there is client side javascript involved.
What URL do you see in browser status bar (lower left corner) when you hover over custom menu link? It should be [site_root]/#services
.
UPDATE:
When WordPress is installed in subdirectory /#services
will link to incorrect page. There is no way to add [site_root]
prefix in menu URLs, so you either use have to use real URL /PS/#services
(and will have to change them all after changing site root) or you can add filter to automatically prefix all menu items starting with /
. Just keep in mind, that in case you need to add link to real site root, you must use full URL http://something.ddns.net/
instead of /
.
function my_nav_menu_link_attributes( $atts ) {
if ( "https://wordpress.stackexchange.com/" == substr( $atts['href'], 0, 1 ) ) {
$atts['href'] = site_url() . $atts['href'];
}
return $atts;
}
add_filter( 'nav_menu_link_attributes', 'my_nav_menu_link_attributes', 20 );