When I add links to pages in a custom WordPress theme I use the following function:
href="<?php echo esc_url(home_url( '/contact-page' ));?>"
If I don't use the
home_ur() function, but the following code, it still works:
I'm currently only doing this on a localhost (MAMP) set up.
Is there any reason why I must use the
home_ur() function instead of just the HTML code, which will be quicker to type, and obviously quicker for the server/browser to process?