How to making dynamic URLs for menus in WordPress?

I have a header Custom Links menu URL like this “/#services”. This takes me to a location on the current page but I want it to take me to the location on a root page. Is there a wildcard or something similar I can use that represents the site root, e.g. “[site_root]/#services”?

I need this because I want to be able to migrate my site to another domain without going through all the menus and changing the URL. I want menus to reflect the site root from the settings of the WordPress.

Read more here:: How to making dynamic URLs for menus in WordPress?

Leave a Reply

Your email address will not be published. Required fields are marked *