Still going for sitewide links? Get your SEO right!

Disregard blogroll links, acquire link juice! By using spinned text, each page of your site will have a unique text snippet in the sidebar, containing a contextual link with a different anchor text each time!

I’ll keep it short and simple:

1. Install and enable the Shortcode PHP Exec WordPress plugin

2. Create a shortcode called spin with the following code:

extract(shortcode_atts(array('string' => '{This is|I am} the default {text|content}.'), $atts));

# Choose whether to return the string or the number of permutations
$return = 'string';
if($calculate)
{
  $permutations   = 1;
  $return         = 'permutations';
}
# If we have nothing to spin just exit (don't use a regexp)
if(strpos($string, '{') === false)
{
  return $$return;
}
if(preg_match_all('!{(.*?)}!s', $string, $matches))
{
  # Optional, always show a particular combination on the page
  if($seedPageName)
  {
    mt_srand(crc32($_SERVER['REQUEST_URI']));
  }
  $find       = array();
  $replace    = array();
  foreach($matches[0] as $key => $match)
  {
    $choices = explode('|', $matches[1][$key]);
    if($calculate)
    {
      $permutations *= count($choices);
    }
    else
    {
      $find[]     = $match;
      $replace[]  = $choices[mt_rand(0, count($choices) - 1)];
    }
  }
  if(!$calculate)
  {
    # Ensure multiple instances of the same spinning combinations will spin differently
    # Ensure we are dealing with arrays
    if(!is_array($find))
    {
        $find = array($find);
    }
    if(!is_array($replace))
    {
        $replace = array($replace);
    }
    foreach($find as $key => $value)
    {
        if(($pos = strpos($string, $value)) !== false)
        {
            # If we have no replacement make it empty
            if(!isset($replace[$key]))
            {
                $replace[$key] = '';
            }
            $string = mb_substr($string, 0, $pos).$replace[$key].mb_substr($string, $pos + mb_strlen($value));
        }
    }
  }
}
return $$return;

3. Make sure the checkbox for Execute shortcodes in (sidebar) widgets is selected.

4. Go to Appearance -> Widgets and add a text widget to your sidebar containing something along the line of:

[spin text='{Visit|Go to} BlueWidgets.com for <a href="http://www.bluewidgets.com/">{blue widgets|cheap widgets}</a> from {reputable|well-known} widget {manufacturers|companies} {such as|like} {Cool Widgets|Barbarian Widgets}!']

This is standard spintax text. You can do better than that, but you get the picture. Use LSI keywords next to the link, vary anchor text A LOT and spin as deep as possible.

5. Et voilà! Each page of your (WordPress based) website contains a contextual link with a different anchor text.

Kommentar verfassen

Deine E-Mail-Adresse wird nicht veröffentlicht.