February 24, 2008

In an earlier post, I showed how you can use OnlyWire to add your favourite sites to 22 social networks. I have added the link to my standard blog template, so that all my visitors can use it.

The only thing that really tripped me up was getting a list of my categories or tags for each posts, so that I can implement the OnlyWire link easily for my visitors.

Here is the code that used to create an OnlyWire link for each of my posts. I added this to my Main Index Page, Single Post and Page templates.

You will need to install the Exec-PHP plug-in for WordPress.

Add this code just above where you want your OnlyWire link to appear inside the php tag brackets:

$posttags = get_the_category(‘, ‘);
foreach($posttags as $tag) { $keywords[] = $tag->name; };
$page_keywords = implode(‘,’,$keywords);

To build the link to OnlyWire, use the following string, with the right tags:
http://www.onlywire.com/submit?u=URL&t=TITLE&tags=TAGS

substitute the following:
URL = the_permalink()
TITLE = the_title()
tags = $page_keywords

You can also use image as the anchor – img src=http://www.onlywire.com/i/onlywire.ico align=absmiddle border=0

Use the php tags as appropriate.

Good Luck

About the Author Charly Leetham

Charly Leetham has worked for over 20 years in the IT industry, specifically in the area of data communications and local area networking. Charly is a qualifed "tech", holding an Associate Diploma in Electronics Engineering. Her experience with Personal Computers ranges from building computers to providing 2nd level user support. Charly also holds a Masters of Business Admin (MBA), specialising in Internet Marketing. Visit her site at ArvoreenTreasures.com

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Free!

Book [Your Subject] Class!

Your first class is 100% free. Click the button below to get started!