TechPedia

RSS Feed

Tech tips, tricks and tidbits!

Wordpress Tip: ShareThis plugin

November 26th, 2007 · No Comments

If you are using the ‘Classic ShareThis’ plugin from AlexKing, you may want to have your links open in a new window. Here’s how.

Open ‘ShareThis.php’ in your text editor.
Find this text:

foreach ($social_sites as $key => $data) { print(&#8217; <li><a href="#" id="akst_'.$key.'">&#8216;.$data['name'].&#8217;</a></li> <p>&#8216;.&#8221;\n&#8221;); }

Change it to this:

foreach ($social_sites as $key => $data) {<br /> print(&#8217; <li><a href="#" id="akst_'.$key.'"target="_blank"'.$data['name'].'</a></a></li> <p>&#8216;.&#8221;\n&#8221;);

Note the inclusion of target=”_blank”. Make sure you put it in exactly as above, or you will get a php parse error.

Save your file. Now, when a user clicks a Share icon, they will not be taken away from your page. :)


Here’s another one. If the floating window isn’t working (if your users are taken to another page to ‘Share This’) make sure that you have the ‘add to footer’ option set to ‘true’:

@define(’AKST_ADDTOFOOTER’, True);

Technorati Tags: , ,

Tags:

0 comments for this entry ↓

  • There are no comments yet for this entry.

You must log in to post a comment.

  • TechPedia is sponsored by:



    1Password - THE password manager for OSX!