Listing Categories and Tags
Internet Marketing February 24th, 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
Popularity: 32% [?]
Keep Updated!Or Subscribe via Email and Choose a Free Product |
Tweet This











Hi, I'm Charly Leetham and on this blog I share my knowledge and observations in Internet Marketing. The topics on this blog can cover blogging, traffic exchanges or even Affiliate Marketing. Generally, whatever takes my fancy. However, I try to discuss the topics that I see around me at the time.








