Social Media Profiles Box

Adding rel=“nofollow” to Social Media Profiles Box

If you use this Thesis box and would prefer to output “nofollow” in all social links, it takes only a minute.

Steps are:

  1. FTP into thesis/boxes/thesis-social-profiles/ folder;
  2. Open the box.php file in a text editor;
  3. Add rel=\"nofollow\" to one line (line #138 at time of writing this)


Near the bottom of the box.php file you will find:

public function profiles($depth = 0) {

Within this function, look for the line that begins $links .= "$tab\t... —line #138 last I checked— and add this snippet:


…into the A tag code.

Like so:

<a rel=\"nofollow\" class=\"icon-social\ ..."

Here’s what the whole line looks like at the time I did this:

$links .= "$tab\t<a rel=\"nofollow\" class=\"icon-social\" href=\"". (!empty($this->profiles[$profile]['prefix']) ? $this->profiles[$profile]['prefix']. esc_attr($this->links[$profile]) : esc_url($this->links[$profile])). "\">&#x{$this->profiles[$profile]['icon']};</a>\n";

You could copy paste the above in theory…

Once done, check.