Hi David,
Do you know how to add rel="nofollow" tag to links, like below, in an array. I've decided to nofollow any hard-coded links that go to a search.php.
$atoz["items"][] = array("name" => "Artwork", "href" => "category/Artwork/");
$atoz["items"][] = array("name" => "Ball Markers", "href" => "search.php?q=ball+marker");
$atoz["items"][] = array("name" => "Books, CDs & DVDs", "href" => "category/Books-CDs-DVDs/");
$atoz["items"][] = array("name" => "Cleaners", "href" => "search.php?q=cleaner");
$atoz["items"][] = array("name" => "Divot Tool", "href" => "search.php?q=divot");
Many thanks,
Neil
Hi David,
Thanks for your reply.
Thinking about his a little more, I actually have quite a few pages, each full of links, to modify. So, perhaps it would be best to sort this once in atoz.php rather than have to troll through 10 or so hard coded pages.
What modification is required to atoz.php?
Many thanks,
Neil
Hi Neil,
Sure - in html/atoz.php you will see this code on line 43:
print "<p><a href='".$item["href"]."'>".$item["name"]."</a></p>";
..simply REPLACE this with:
print "<p><a rel='nofollow' href='".$item["href"]."'>".$item["name"]."</a></p>";
Cheers,
David.
Hi Neil,
Ordinarily, this would require a mod to atoz.php itself, however if you only want to have these particular links nofollow, you could hack it in as follows (per line):
$atoz["items"][] = array("name" => "Artwork", "href" => "category/Artwork/' rel='nofollow");
(notice the missing ' from rel='nofollow - this is because it will be added in by atoz.php when generating what it thinks is just the href='' attribute...)
Cheers,
David.