When everything else fails, I turn to stackoverflow.
I have two websites that I am in the process of creating a theme for. In the footer section of each website I include two links: one to the privacy page and the other to the terms page.
On the first website, the permalink to those pages is as follows: www.website.com/privacy and www.website.com/terms.
On the second website the permalink to those pages is as follows: www.website.com/privacy-policy and www.website.com/terms-conditions.
Here's what I was hoping to do. Instead of hard coding the urls to these two pages from the footer section, I wanted to generate them dynamically.
Heres an example of what the if statement might look like:
<a href="
<?php
if (the url exists) {
echo the_permalink('privacy');
} else {
echo the_permalink('privacy-policy');
}
?>
">Privacy</a>
Your help is appreciated.