I want to echo out an link to a site A in the footer of site B, so that it is more seo friendly and not flagged as a site wide link, and ignored / given less weight to, id like to set it to rel=”nofollow”, apart from on the home page.
Is there a simple way to do this in word press something like :
if ($page == 'homepage') {
echo "<a href="#">Site A</a>";
} else {
echo "<a href="#" rel="nofollow">Site A</a>";
}
The function you need is
is_home()
:Try using the global WordPress variable $pagename.