Wordpress plugin: Multi-column Tag Map
Oct6th
2009
••
I’ve never been one for tag maps. I’ve never liked non-alphabetical listings of tags in sidebars. I never like lists of tags ordered by the “popularity” of the tag in question. All these make it extremely difficult scan and find the topics that interest me. In large sites with hundreds of tags, all these approaches are more a hindrance than a feature.
That’s where Multi-column Tag Map comes in. A simple, lightweight plugin that pulls all the tags used in the site and builds an alphabetical list out of the results. The extras include displaying the list in multiple columns (1-5) and using a drop down feature to limit the initial amount of tags listed.
In larger sites, this would be perfect to devote an entire page to. Users can easily scan the list for topics of interest and find exactly what they are looking for without having to dig through ugly tag clouds and seemingly random ordered lists of tags.
Usage
- Drop mcTagMap folder into /wp-content/plugins/
- Activate the plugin in your admin panel
- Insert the code where you want to generate the list
- Edit the parameters
<?php if(function_exists('wp_mcTagMap')): ?>
<?php wp_mcTagMap() ?>
<?php endif; ?>
Options
- columns (1-5) - default: 2
- more (the .more link text) - default: “View more”
- hide (yes or no) - default: no
- num_show (how many to show before displaying the more link) - default: 5
Only four parameters. By default the plugin will generate the list into two columns and will show all the tags. You can change the number of columns between 1 and 5. You can tell it to limit the number of shown tags to any amount. This will use jQuery for the revealing so make sure you are lining to jQuery. You can then change the text of the link that is used to display the remaining tags in each list.
They are added to the function just like other plugins, eg.
<?php if(function_exists('wp_mcTagMap')): ?>
<?php wp_mcTagMap('columns=4&hide=yes&num_show=5&more=View more') ?>
<?php endif; ?>
Shortcode Functionality and Installation
[mctagmap columns="3" more="more!" hide="yes" num_show="4"]
This uses the same options as the previous versions. Now no need to manually alter your themes files.
Examples
Default 2 columns || 4 columns with hiding on
Download
This plug-in is now available only from the WP repository: Download here
Edits and Change log
- v1.2 - Updated the plugin PHP to correct the CSS path.
- v1.3.1 - Fixed a conflict in jQuery for the show/hide to work.
- v2.0 - Added shortcode functionality.
- v2.1 - Fixed the default sorting behavior.













2009
••
Great idea, looks terrific. I can’t get columns to work on my site though: http://gorey.com.au/about/tags
2009
••
Great plugin but i cannot get columns on my website http://singh.com.au/tags/
2009
••
Hello,
thank you, I like that plugin, but I’ve got the same issue with the columns at my site
http://www.magratknoblauch.de/tag-map/
On the other hand (at my other site) you can see 2 columns (there are only 4 or 5 tags until now) : http://www.tabattfamily.net/?page_id=79
Do you have any idea? It would be nice…
2009
••
this was what I looked for for a long time, but I want to enhance this with custom taxonomies.
I’ve created custom taxonomies using Yoast’s simple taxonomies plugin http://yoast.com/wordpress/simple-taxonomies/
But how can I list them alphabetically with your plugin ?
Can you guide please ?
Thanks
2009
••
How can i get columns to work with this plugin. Please help.
2009
••
@Michael, Nav and Nicky,
Wordpress repository changed the name of the folder. This created created an incorrect path to the CSS. I have made a revision (version 1.2) and uploaded it to Wordpress and the link above is also updated. Please download the new version and feel free to post back if there are still any issues.
@eddai,
I’m not familiar with that plug-in, or using taxonomies for that matter. I’m not sure how do go about combining the two off hand.
2009
••
@Magrat,
On magratknoblauch.de, it appears you used the version from the WP repository. That version had a broken link to the CSS. It has been updated both on this site and on WP.org.
On tabattfamily.net, it looks like you were using the version previously posted on this page. So the path to the CSS is correct.
Please download the new fiels (v1.2) and see if this fixes any issues.
2009
••
Dear Mr,
Your plugin seems great. I had like to take into account categories (use to create site sections) with a line at top.
In case one level
(All) Environment Nutrition Training
= list tags for the selected category
In case of subcategories, something like:
(All) > Environment > altitude heat cold
= list tags for the category or the selected subcategory
2009
••
@FabriceV,
on this post:
http://wordpress.org/support/topic/276635?replies=21
it looks like they are trying to do the same thing. I haven’t tried to do the same. It appears they are having difficulties achieving it as well.
I agree it would be a nice feature but, at this time I am not quite sure how to go about doing it. If I (or they) do find a way, I will look into making it either part of this plug-in or making a new plug-in with that feature.
2009
••
Works sweet now, thanks. Shifted page to http://gorey.com.au/tags in case anyone wants to see it in action.
2009
••
Thank you very much, it works now - with the updated files - at both sites and I’ve got very nice columns.
But… what about the ‘Hide’-thing? Is there any spell to make it work? JQuery is integrated in the header, I think, so where I’m doing something wrong here
http://www.magratknoblauch.de/tag-map/ ?
Do you’ve got any idea? Would be so great!
Thanks and have a nice day!
2009
••
@Magrat,
Sorry about that. Unexpected conflict in jQuery. I updated again. Seems to be alright now.
2009
••
Thanks, Alan, that’s great, now that I know that I can make a mess of anything other than my WordPress-Code
!
So I’m looking forward to the next update…
2009
••
It works excellently! Good job!
2009
••
I use your plug-in as my archives page, like the back of a well written book. It’s priceless and I believe the naturally best archives ever written. Here it is: Leis Network Archives.
I intuitively like the Index approach over other forms of accessing posts. But then, I usually prefer the Index over the Table of Contents, which a well designed Menu really emulates. Categories are often unintuitive; besides, shouldn’t there be more than one way to access a post? That’s what tags are for. And other than a small display of longevity, I don’t understand the purpose of chronological archives.
I do use an alphabetized tag plug-in (with most often used tags sized larger) on my post pages. I imagine people will want to see what the site is about, and quickly find the meat of it.
Thank you for your work. I believe it is one of the top 20 WordPress plug-ins.
2009
••
@Jim,
I agree completely. Of course this depends on the size and scope of the site in question. On my site, I have a small number of categories so finding relative posts seems pretty easy. On your site, you cover a lot more topics. Your site is essentially what I had in mind when writing this plug-in and giving the user an index style way of searching for relevant information.
I’m glad you found this useful. Very kind words and much appreciated.
2009
••
Great plugin! It works like a charm, but their is some things I miss, like using WordPress short codes to insert it it, like [tagcolum]. Also, as can bee seen at http://www.kennethjansson.net/kusin/arkiv/ the columns aren’t displayed in a “nice” way if they aren’t equal in size, a better way would be if every column is equal in size both in X and Y, e.g. the biggest one, decides the size of its neighbour. So keep up the good work!
2009
••
@Kenneth,
Very good idea. I’ll look into that on the next release. My thoughts were that this would be best suited for a dedicated page. Seeing yours working I can see the value in this option.
There is an equal height plugin that would be very easy implemented with this. It would take care of the Y height. The X is controlled through CSS. I agree though that using the equal heghts in conjunction with the show/hide feature of this plugin would make it more visually appealing on load.i could probally bundle the two together and give another option for that feature.
Maybe I’ll work on an admin assessable version with a control panel.
I’m glad it worked as intended for you though.
Thanks,
Alan
2009
••
I can’t find that plugin, do you have a link? When it comes to implementing it, it’s easily done by using templates on pages. I was thinking about the “view more” part, if every tag part has more then say five tags, it would look great. Perhaps I turn that on. When I was think of being able to set size both X and Y i didn’t think on what if one “letter” has only a few tags, then the gap between it and it’s neighbours would look awful. Then the “view more” has a great function. So go and drink a lot of coffee and begin creating! =)
2009
••
@Keneth,
http://www.filamentgroup.com/lab/setting_equal_heights_with_jquery/
Thats the jQuery script that does equal heights. Since each div containing a list has the same class it should work fine, although I have not tested it yet.
I don’t think I completely understand what you mean by “X” though. The CSS controls the width (x) so you can make that part fit your needs. The “Y” or height, is controled by the sher amount of tags shown. Using the sow/hide faeture can help that. With the use of an equal height script, they can be all the same vertically on load.
2009
••
Sorry, what I meant was being able to set the same hight. In my example not every tag-letter has the same amount of tags, so even if I use the limit of 5, 3 or more or less, the hight will difference. Whit that jQuery I can solve that problem, giving them equal hight, even with say limit of 5, the neighbors with less than 5 will have same hight.
2009
••
I am using WP 2.8.5 and have attempted to place your code in a sidebar with a left- and right sidebar and single center column. First, I am having difficulty I getting this to work in a sidebar without affecting the other columns on the page and I am not able to get the list to display in more than one column even though I have set columns to 2 and even using your example, to 4.
I suspect that I am simply placing the code in the wrong place. Can you please provide more details on just where to place the code (and where not to place the code)?
I would like to place this in the left sidebar, either within a text box or directly in the sidebar php file.
1. How do I place it in a widget text box?
2. How do I simply place it into the sidebar php file that currently contains:
div class=”art-sidebar2″
php if (!art_sidebar(2)):
php endif
/div
Thanks!
My current sidebar 1, where I’d like to place the code is:
2009
••
@Matthew,
The below is the widget function:
<div class="art-sidebar2"><?php if (!art_sidebar(2)): ?>
<?php endif; ?>
</div>
I can’t test this locally because I don’t have the function it’s looking for. But, if I paste the following into my sidebar.php, it works as intended.
<?php if(function_exists('wp_mcTagMap')): ?><?php wp_mcTagMap('columns=1&hide=true&num_show=4&more=click here') ?>
<?php endif; ?>
This of course needs to NOT be inside the widget.
This works fine in my tests to only show the tag map on the sidebar on pages:
<?php if ( is_page() ) {?><?php if(function_exists('wp_mcTagMap')): ?>
<?php wp_mcTagMap('columns=1&hide=yes&num_show=5&more=View more') ?>
<?php endif; ?>
<?php } ?>
As for not getting it to display in multiple columns, remember that the column width is defined in the CSS in the plugin folder. Since the tag map columns are floated, if there is not enough room on your sidebar for multiple columns (horizontally) then the columns will fall below each other. So it might look like there aren’t multiple column when in actuality there are. Make sense?
If you are still having issues after this, maybe open a post on the Wordpress forums so others might benefit from the solution to your issue.
2009
••
Alan,
I placed the code update you emailed me into the mctagmap.php and have also made the several changes to the plugin CSS file. The second CSS changes gives me two column display. The bullets and tag text continue to both display overlapping at the left margin/column and I get “class=”more”>See More” at the end of most divisions of the list. I tried to force the line text to the right by adding five times after each in the .php file but got no change.
As suggested, I’ll look closer at the Artisteer-generated theme that I’ve created. It already has another problem in that my vertical spacing before and after bullets is ignored.
Thanks for your help!
Matthew
See current implementation of the tag list at See at: http://theindependentview.com/?page_id=98.
2009
••
@Matthew,
I sent you an email with some modified php. There was a line break in the code in my last email, that seems to be causing the “see more” link error. Just replace your mctagmap.php with the one I attached.
As or the bullets, the default CSS is conflicting. Make this change:
.art-PostContent #mcTagMap .tagindex ul li {
padding: 2px 0 2px 10px;
margin: 0;
}
Just adjusting the padding to move the text off the bullets.
2009
••
Hello Alan,
I’ve searched a lot for such a plugin and I find it here. I have only one problem: how can I display the tag list in a page? In other words: I created a wordpress static page (title, some content, etc) and I want to display the tab list bellow the content. Do I have to install a php-exec plugin?
Thank you in advance.
2009
••
@Alex,
Hopefully this will suit your needs:
if ( is_page('PAGE_NAME')) {
<?php if(function_exists('wp_mcTagMap')): ?>
<?php wp_mcTagMap('columns=4&hide=yes&num_show=5&more=View more') ?>
<?php endif; ?>
}
Paste that in your page.php under the loop that gets the content.
Change ‘PAGE_NAME’ with your sites page name.
2009
••
Love the plugin, just what I was looking for.
Was wondering if you could help with the following.
I wanted to be able to just display the tags within a particular category. e.g I want to add the tagmap to the top of each category page so that when a viewer goes to say category xx then they will only see tags listed A-Z if the post is within the category xx that they are in.
Thanks in advance
2009
••
@TeeJay
on this post:
http://wordpress.org/support/topic/276635?replies=21
it looks like they are trying to do the same thing. I haven’t tried to do the same. It appears they are having difficulties achieving it as well.
I agree it would be a nice feature but, at this time I am not quite sure how to go about doing it. If I (or they) do find a way, I will look into making it either part of this plug-in or making a new plug-in with that feature.
2009
••
Thank you Alan. It works fine!
2009
••
Hello
I tried yesterday to get this plugin to work, but I could not manage.
I tried to place the CODE: (Copied it from above)
——–
?php if(function_exists(’wp_mcTagMap’)): ?
?php wp_mcTagMap(’columns=4&hide=yes&num_show=5&more=View more’) ?
?php endif; ?
——
“Different places”, but with no succes( I want to place my Multi-column Tag Map on a specific page)
For example I tried to copy the code direct to a page. I also tried to copy it direct into a text on the sidebar (as a widget)
But I probaly have to edit my theme in the editor ( And copy the code somewhere?)
So my question is:
If I want to place a Multi-column Tag Map on a specic page, where should I place the code?
(I am using the Atahualpa 3.4.4 Theme, which is a great theme. But it also manages all the HTML code for me…)
Hope someone can help me. I would appreciate it. As you probaly can hear am I quite new to this (-:
Thanks
Jens
2009
••
@jens,
In your page.php file of your theme try inserting this:
<?php if ( is_page('PAGE_NAME')) { ?>
<?php if(function_exists('wp_mcTagMap')): ?>
<?php wp_mcTagMap('columns=4&hide=yes&num_show=5&more=View more') ?>
<?php endif; ?>
<?php } ?>
Replacing ‘PAGE NAME’ with the name of the page in which you want the list to appear.
I haven’t updated this to include short codes as of yet so you will need to access your page.php directly.
If that doesn’t work for you let me kow and I’ll try to help you out more.
2009
••
@All,
I have updated this plug-in to include shortcode functionality. This has been requested several time so it was about time. Version 2.0 has the upgrade and installation instructions. The plug-in will still work with the old code as well.
2010
••
Nice plugin.. have you ever used this plugin with the Thesis theme?
I’m looking to use it in the sidebar.
2010
••
@Mitch,
I’m not familiar with the Thesis theme but, I don’t foresee any issues with using this plug-in. I will assume there is a sidebar.php file. Don’t try and use the shortcode, use the original long way instead.
2010
••
Thanks for this amazing plugin!
Sorry, but does anybody have idea how displays tags starting only with the letter “A”. And other tags starting with letters (b, c, d..) hide or not displays.
p.s. sorry for my English.
2010
••
Hi Alan,
I’m testing this out in WP 2.9.0, and it works great! However, for some weird reason, it’s not listing the tags alphabetically, but at random? Here’s the link to the page, so you can see what I mean: http://sjbmx.com/tag-index/. Now, I haven’t changed anything in the code, so do you have any ideas on how to go about fixing this?
Thanks,
Chris McMahon
2010
••
@Chris,
I couldn’t reproduce this on my local install but I did have a look around. It appears your site is sorting in DESC order. There by the letter with the most tags total first and than sorting the tags that have the mosts posts first. It should be sorting ASC by default I believe.
I updated the plug-in to v2.1. Please upgrade and let me know if this solves the issue.
Thanks for bringing this to my attention.
2010
••
@Alan,
I installed the latest version, but the issue still crops up.
- Chris
2010
••
Nice plugin and it creates a nice listing which I’ve put on a page (using the shortcode). However, I want to write a short introduction to explain what the list means - and no mater what I do, the text appears UNDER the listing instead of before it.
What I’ve typed in is this:
“Click on your suburb in the listing below to see teachers who offer classes in that area.
[mctagmap columns="2" more="more!" hide="no" num_show="30"]“
2010
••
@Chris,
I looked some more and I can’t see any real reason that it is sorting incorrectly. What it appears to me is that it is sorting the lists by the total number of posts tagged. I noticed “S” has less tags than “B” on your site but it looks like “S” has more posts being tagged. Again, I can not reproduce this. I looked at a few other sites that are using this plugin and they seem to be working fine even with WP2.9. Maybe try turnign off one plug-in at a time and refreshing the page to check for conflicts with other plug-ins. I will still try to find an answer in the meantime.
@Sirena,
I updated to v2.2. Please update the plug-in and see if this handles your issue.
2010
••
You’re a doll, thanks so much! All fixed. This is a great plug-in, the first I’ve seen that allows you to display tags on a page properly.
2010
••
This sounds so stupid but it cannot be helped. When you install this widget, where do you go on the panel in WordPress to set it up? I cannot find it.
2010
••
@Cody,
Not stupid but maybe a little mis-guided. This is not a widget. There is no place in the dashboard to ‘turn it on’ or modify it in anyway. You can use the shortcode method to make it show up in a page or a post. If you want to display the tags in the sidebar for example, you’ll need to use the long way. Actually hard coding the PHP into your file.
There are examples above for both these methods. Examples are also on the wordpress plug-in page for this as well as the readme.txt file in the download.
If you need any more help, just shout.