[ad_1]
I’m building a classic php theme and am running into a problem.
Say I have a page /about/
I link to the page in my navbar, footer and maybe a few other places like this href=”echo esc_url(site_url(‘/about’));”
It works good, however , if I change the slug in any way, i would have to change this function parameter three places.
Id like to store this in a function or something, and refer to this function instead of the hardcoded ‘/about’
And then when changes need to be made, only Change it one place.
Any suggestion of a clean implementation?
[ad_2]