I have a tag cloud page that is in list format. It is displaying fine, but I want to add two small syndication icons immediately after each tag name. What code do I need to add so readers can easily subscribe to a tag feed by clicking an icon? Currently, this is what I have:
<?php /* Template Name: Tag Archive */ ?> <?php get_header() ?> <div id="content"> <div id="category_page"> <?php global $posts_per_page, $paged; ?> <h1>Tag Archive</h1> <div class="left single"> <h4><?php wp_tag_cloud('smallest=10&largest=10&number=100&format=list'); ?></h4> </div> </div> <?php get_footer(); ?>
If there isn’t a way to get the desired result with a tag cloud, is there a way to get the same result using something other than a tag cloud?
You never gave us enough information. What is the actual code that you want to add after each icon? Saying “a syndication link” doesn’t really tell us what you want to do. I mean, I know what a feed link is, but I’m uncertain how you want it to look or what have you. Where are the images you want to use for the icons? What are the ‘two’ links to? Do you want them to be inside the LI tags, or outside them? Also giving us an example of the current html output would be extremely useful, so we don’t have to go and generate it ourselves. Simply giving a link to the page where you currently have this cloud would help a lot.
Basically, you have to tell us what you have currently and what you want it to be. We can then tell you how to make the difference.
However, generally speaking, you’ll need to create a filter function on the ‘wp_tag_cloud’ filter and then have it do some clever preg_replaces to insert the links you want into the code.
- The topic ‘Tag Cloud – Adding Syndication Icon’ is closed to new replies.