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.
This might sound like a lot of negativity but, “Necessity is the mother of invention” after all.
That’s where Multi-column Tag Map comes in. A simple, lightweight plug-in 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), displaying tags that have no posts associated with them yet, limiting of the number of tags shown on load, a simple “show more” feature to reveal tags hidden on load and an accordion toggle “show/hide”.
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 tag clouds and seemingly random ordered lists of tags. You can think of this as a true index of your site.
Example
Using the following shortcode and the default CSS. I don’t have a lot of tags on this site but, this should give you a good idea of the output.
[mctagmap columns="3" more="more »" hide="yes" num_show="1" toggle="« less" show_empty="no"]
Notice: This plug-in was updated 03.09.10. Please download version 3.0 from WP.org. It will no longer be hosted on this site. Please make a backup before updating any files if you have modified any part of this plug-in.
I will continue to support this plug-in so if there are additional features you feel would help this plug-in, feel free to comment and let me know.













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.
2010
••
Alan, the plugin v2.2 is great!
I did have to create a post, however, and assign it to every tag to get the tag list to display. See - http://lifegivingspring.info/bibliography
Is there any way to modify code to show all tag entries even though there aren’t any posts tagged with them yet?
Also, cannot set tag entry display to ‘0′; lowest setting that works is ‘1′. Alphabetical tag listings with more than 1 entry then show ‘+’ link for expanding list to all tag entries.
Is there code modification for just showing alphabet letters with ‘+’ link and no tag entries, that when clicked, expands for viewing all entries in alphabet list?
2010
••
Correction:
I don’t need to show empty tags (without any posts), but I did have to create a public post with same tags as private posts to get the private posts to list.
I’m using WP Sentry plugin to make posts private.
AVH Extended Categories plugin lists private posts even though categories only include private posts, but Multi-Column Tag Map plugin will not display tags for private posts.
As long as there is a public post with same tag as private post(s), then private posts will list along with public post.
I’ve created workaround by adding a public post ‘X - End of Posts’ that will only show at end of list of post summaries (by nature of beginning with letter ‘X’), but am interested in knowing if there is some code modification for listing private posts.
Would also still like to be able to click a link beneath each alphabet letter to show tags.
Then be able to click button to hide them again (such as “+” and ‘-’ links)
2010
••
@D.Stall,
If I add the shortcode like so:
[mctagmap columns="3" more="more!" hide="yes" num_show="0"]it doesn’t show anything but the alphabet heading and a link “more!”. I am not getting any issue resulting in having to have at least 1 tag shown.
For tags from private posts, I’m sorry, I’m not familiar with private posts enough to think of how to do what you need. I’ve just never needed that functionality. I’ll look into it but I can’t honestly offer a solution any time soon.
For the showing and hiding…
[mctagmap columns="3" more="[+]" hide="yes" num_show="0"]Will give you your ‘more link’ as a plus sign wrapped in square brackets.
In the mctagmap.php change this line (#248):
jQuery(this).parent('li.morelink').remove();to this:
jQuery(this).text(jQuery(this).text() == '[-]' ? '[+]' : '[-]');That will make your “more link” toggle the list as well as change from [+] to [-] on click.
*NOTE: back up your mctagmap.php as any upgrade I make to the plugin will over write you changes.
2010
••
1) Instead of entering ‘0′ in code for show, I entered ‘none’ and got what I want, only the ‘+’ show function.
http://lifegivingspring.info/bibliography#x
Is there any way to turn this into a true jQuery show/hide function where there is a hide link as well as a show link?
2) Am still interested in any code modification that will list tags with posts made private via WP Sentry plugin.
2010
••
Great plugin but there is a minor bug in the closing of DIVs when the number of tags is low or none. On the lines (about 231 and 459) that has the Sorry blah blah tags found then that should have a closing DIV and it should say….
Sorry, but not enough tags were found
On about line 79 it should say if( $tags && is_array( $tags ) && count($tags) >= $options['columns'])
And on about line 306 it should say if( $tags && is_array( $tags ) && count($tags) >=$columns)
(or something similar but that is the easiest logic to work out) because if you have say 1 tag then it throws in a extra DIV that does not get closed which messes your template layout. AFAIKS as long as you have at least as many tags as the number of columns you want then you’ll be fine forever. My fix patches the first-day-of-use kind of problems when you first enable the plugin on a new blog site and then panic when the layout has gone all wonky.
Using WP 2.9.1 and latest 2.2. plugin.
Regards,
Lincoln (openmtl)
2010
••
@D.Stall,
please go to the plug-in download page and read the new description and installation pages. I made several major updates that hopefully will address your wanted improvements.
What I showed you in my last reply was a ‘true’ jQuery function. You wanted a different presentation in which you were not specific upon asking.
I’m still not 100% sure how this will work out with the WP Sentry as I don’t use that plug-in but, in theory this should remedy your issue.
@Lincoln,
Good catch. I can say that I never tested this in a way to make what you discovered happen. I will try and make some time in the next few days to change it up to allow less tags than columns.
I appreciate the eye.
2010
••
@Alan - Works great! Just what I was wanting! Thanks!
FYI - WP Sentry only allows customization of permissions of registered users who are logged in. With WPS, list of post summaries display in category list regardless of WPS privacy setting, but for some reason, post summaries wouldn’t display in tag summary list created by your MCTM tag plugin if a ‘private’ setting had been applied to post in WP Sentry.
Your MCTM tag plugin now creates tag list just like categories list: all post summaries display in list, but only users logged in see full post.
BTW - There is only 1 other bell/whistle that would be nice.
I’m using background-images (plus/minus) as show/hide button with hover function for consitent display in multiple browsers.
See - http://lifegivingspring.info/bibliography
Is there anyway in the php code you can assign a different class other than ‘.morelink’ to link that shows after alphabet tag list expands? Currently the “hide” link is class ‘.morelink’ just like the “show” link is before clicking and expanding the list.
If the class of the ‘toggle’ for the expanded link were class ‘.lesslink’ instead of ‘.morelink’, then I could assign a different button image to it in css ( a ‘minus’ image instead of the ‘plus’ image).
2010
••
@D.Stall,
Actually the links for more & less are different links. In your CSS you can do:
.morelink a.more {}
.morelink a.less {}
It is a normal toggle but I purposely made them with two distinct classes just for the reason you mentioned. Being able to add different image backgrounds.
2010
••
Updated my CSS and works great. Full functionality for my use. Thanks again!
2010
••
@D.Stall,
No, thank you. It added features to the plug-in that in my view, make it better. Thanks for posting.