When I create pages within Wordpress, the call to action links on those pages always have the same URL. I want to be able to globalize this variable but am struggling to find a good way to do it.
If I were making simple PHP pages I could simply include e.g.
$URLpath = "http://example.com/my/page";
Then call this in the html:
<a href="<?=$URLpath?>">Call to action</a>
Obviously I can't do this within the Wordpress CMS as it renders as <?=$URLpath?>
I could add, say, <a href="#MyVariable#">Call to action</a> and replace after the page loads using javascript replace over the whole block of html, but it doesn't feel efficient to do this.
Is there a better way? I'm pretty new to Wordpress.