Wordpress Plugin: tags4page
With the new 2.3 release Wordpress supports a native tagging system for posts. This plugin allows you to insert tags to pages too and not only to posts.
Requirements:
WordPress 2.3 or later (You MUST have at least 2.3 version).
Installation:
- Download the plugin tags4page
- uncompress it with your prefered unzip/untar program or use the command line: tar xzvf tags4page.tar.gz
- copy the file tags4page.php in your plugins directory at your wordpress blog (/wp-content/plugins)
- activate the tags4page Wordpress plugin at your Plugins admin page
Usage:
When you activate the plugin it just works adding the tags field to the page editing form. Fill it with the tags you want in each page.
To view the tags in your blog you have to add the Wordpress function <?php the_tags(); ?> to your themes, please refer to the documentation page for more information.
Screenshot:
Full view
The field to put the tags for your page
Changelog:
- 1.1 added Wordpress 2.5 support
- 1.0 Initial release.
Thanks to Diarizing for idea.
Tags4Page is in the official Wordpress Extend Plugins Directory, every times I’ll upload a new release your wordpress (only for >=2.3) will notify you.
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.




17:35 on September 26th, 2007
Thanks for this! After the update to include the pages in the taglist, all of the old functionality is restored!
Many thanks!
01:06 on September 28th, 2007
hi michele!
exactly what i was looking for. - perhaps you could extend your plugin to show the page-tags in the tag-cloud, too… (now only post-tags are shown)
cheers berny
18:07 on October 1st, 2007
I don’t know where to put
Could you explain which file and where in that file it should go please?
18:08 on October 1st, 2007
I mean the_tags();
19:28 on October 1st, 2007
My question is similar to Berny’s. I want to show the page tags in the sidebar tag cloud like the posts. I tried adding the code to a text widget but that didn’t work. What am I missing? Thanks.
19:32 on October 1st, 2007
Christopher, sorry but I think the plugin is missing the function to add the page tags to the wp_tag_cloud function (it works only for the_tags function now). I’m searching for a solution to fix this.
When I’ll release a new version with this fix you’ll be notified
20:09 on October 1st, 2007
Thank you for the explanation of how to put it in the entry div class. I have it working now. And, I look forward to having these show up in the cloud. I much appreciate your work.
22:57 on October 1st, 2007
Any way to make the tags work with the search feature? Working on an online store where each product has it’s own page, but the search feature still won’t find the pages for some reason. TIA.
08:57 on October 2nd, 2007
i managed to include the page-tags in the tag-cloud. - you have to remove the post_type in both sql-statements in wp-includes/taxonomy.php. - not a nice solution, but it works. important: after you applied the changes you have to add/remove a tag, because the tag_cloud is based on cached results!
berny
06:17 on October 6th, 2007
Berny,
Thanks. I am looking through taxonomy.php but I’m not a php guy, so could you please be a bit more specific on which lines I need to comment out? Thanks.
13:53 on October 6th, 2007
hi christopher!
i posted a detailed description regarding your question on my weblog.
berny
18:01 on October 6th, 2007
Berny,
Thank you so much! It works like a dream. I’ll have to remember to update manually.
17:58 on October 8th, 2007
@Berny & @Christopher: I found the time to test the wp_tag_cloud function and I can tell you that my plugin works well with that function too.
If you active my plugin and use the wp_tag_cloud function it shows up tags from pages too “as is”, without changing anything in the WP files.
Could you check it please?
10:08 on October 9th, 2007
@christopher: you’re welcome!
@michele: you’re right, it also shows tags for pages, but only if you used these tags for posts, too. - in other words, tags which are only associated with pages are not included in the tag cloud.
berny
10:17 on October 9th, 2007
@berny: Thank you very much, you are right that is the problem, and I’m looking for the solution, stay tuned.
00:24 on October 10th, 2007
Great idea for a plugin, and just what I was after. I look forward to seeing your solution to the tag cloud “problem”.
18:33 on October 15th, 2007
Solution to page tags not rendering in the cloud.
I can not get the required change to work within the “add_filter” — ie. not the nice WP plugin way… but my dirty hack is the following:
./wp-includes/taxonomy.php
== line: 1391 {orig} ==
$count = $wpdb->get_var(”SELECT COUNT(*) FROM $wpdb->term_relationships, $wpdb->posts WHERE $wpdb->posts.ID = $wpdb->term_relationships.object_id AND post_status = ‘publish’ AND post_type = ‘post’ AND term_taxonomy_id = ‘$term’”);
== line: 1391 {modified} ==
$count = $wpdb->get_var(”SELECT COUNT(*) FROM $wpdb->term_relationships, $wpdb->posts WHERE $wpdb->posts.ID = $wpdb->term_relationships.object_id AND post_status = ‘publish’ AND (post_type = ‘post’ OR post_type = ‘page’) AND term_taxonomy_id = ‘$term’”);
Basically - this is what updates the count on the “wp_term_taxonomy” table… and that is what drives the tag cloud.
If this plugin gets updated to include that modification in a clean way, I’d love to hear about it.
Big Thanks, Michele Marcucci!
-alan blount
http://zeroasterisk.com/
23:43 on October 17th, 2007
Hello word !
The plugin SimpleTags can manage Page with tags without hack. (for counter)
It allow to display pages in tag search.
Try, like and share
http://wordpress.org/extend/plugins/simple-tags/
It added lot’s of functions…
Autocompletion, suggested tags, mass edit, etc ;)
02:20 on November 24th, 2007
I am new to WP, but not new to web pages, message boards and php. I would not consider myself expert enough in any of it to do more than give a cursory level class to anyone though.
I am trying to get a Blog going. I have read about tags, meta, and clouds… Now I am a little confused as to how they are used and edited. In HTML you might use Metatags, but meta seems to have a different use here.
I have also looked into Ultimate Tag Warrior and tags4page… I understand some plugins do not work with 2.3, so I have been careful to not work with anything I am not sure works with this version. I could not find where UTW works with 2.3, so unless Iam wrong, I am just staying away from that.
So I uploaded tags4page…
How do I go about editing the input so that I can have tags improve SEO????? I can’t seem to find anything in the control panel areas of WP…
Mostly I am looking to just have the site have editable tags… not too concerned about pages…
17:23 on December 10th, 2007
Great plugin for wordpress. It´s exactly what I looked for. Thanks!
23:49 on December 12th, 2007
Thanks a lot! It works just fine - and I like the ability to put tags on my static pages. Thanks again.
09:35 on December 18th, 2007
Very usefull plugin. Thanks a lot!
18:04 on December 18th, 2007
Very good plugin; I was surprised to find that WordPress did not include this functionality. But this plugin seems to be doing the job well. Thanks.
15:21 on March 19th, 2008
Just a question: Has anbody tried it in Wordpress 2.5 yet? Does it work?
14:43 on March 28th, 2008
Thanks for this! After the update to include the pages in the taglist, all of the old functionality is restored!
Many thanks!
09:25 on April 2nd, 2008
[...] Visit [...]
12:20 on April 3rd, 2008
After updating to WordPress 2.5 all tag links
/tag/foo/resulted in a 404 page. I deactivated all plugins and was able to narrow it down to tags4page as the cause. I appreciate the functionality of the plugin and wouldn’t like to miss it. Pleeeeaaase fix it.16:26 on April 10th, 2008
Thanks for this great plugin. Seems not to work with 2.5. :(
07:04 on April 13th, 2008
Here’s a solution for the problem with WP 2.5.
You need to change the function addpagetowhere to look like this:
function addpagetowhere( $where ) {
if( is_tag() ) {
$where = preg_replace(
“/ ([0-9a-zA-Z_]*\.?)post_type = ‘post’/”,
“(${1}post_type = ‘post’ OR ${1}post_type = ‘page’)”, $where );
}
return $where;
}
The existing version produces bad SQL in WP 2.5, but this should fix it. Hope people find this helpful.
19:57 on April 13th, 2008
Thank you for the hack. I can’t fix the problem this way.
WP still returns a 404 when I call a http://domain.de/tag/tag4page
Have a look ….
08:41 on April 14th, 2008
Thank you John I just released the 1.1 version with your changes. Now it should work with Wordpress 2.5 too.
08:40 on April 17th, 2008
Yeap, v1.1 DOES work with 2.5 now! Thx
09:02 on April 17th, 2008
That works. Great. Thanks a lot. :)
14:36 on April 23rd, 2008
tagcloud still won’t work :(
I’m trying to make my recipe collection searchable by ingredient :)
08:33 on April 24th, 2008
[...] tags4page : aggiunge i tag alle pagine [...]
18:46 on April 24th, 2008
[...] Well, out of the box you can’t, (not sure why) but there is a decent plugin called “tags4pages” that will add the tagging field to [...]
20:33 on May 1st, 2008
[...] Wordpress Plugin: tags4page (tags: wordpress plugin tags pages) [...]
06:13 on May 14th, 2008
It seems like the only problem with this is it doesn’t update the count in term_taxonomy table. I was looking for a clean way to modify this mod to that end, but I’m still bumping into walls as I explore WP for the first time.
11:23 on June 2nd, 2008
Thank you michele , nice plugin
hope you continue develop it …
and 4 star from me on wordpress.org
02:31 on June 3rd, 2008
[...] WordPress Plugin: tags4page (tags: WordPress Plugin: tags4page , fosdir fosdir.com) [...]
16:01 on June 12th, 2008
[...] http://www.michelem.org/wordpress-plugin-tags4page/ [...]
11:58 on June 13th, 2008
Thank you michele , nice plugin
19:42 on June 20th, 2008
Lovely little PlugIn! I’m using WP 2.5, and am wondering if there’s an update for the Tag Cloud with my new tags for the pages.
Thanks,
deb
19:59 on June 20th, 2008
Neverthemind - when I added a post with the relevant tags, it all seems to work just grand now. Thank you for this great plug-in for static content! They needed some love, too!
deb
18:20 on June 24th, 2008
Hi, Dear Can you please help me out? If I want to create a page http://www.example.com/tag-list and which will automatically collect my all tags and show in /tag-list page. As well as, this will automatically updating all my tags always. How I can do this things? Looking for your help?
PS: I have self hosted blog site ;-)
20:22 on June 29th, 2008
[...] tags4page [...]
00:33 on July 2nd, 2008
Does it work on WP 2.5.1?
09:16 on July 3rd, 2008
Very usefull plugin. Thanks a lot!
17:57 on July 3rd, 2008
Thanks so much for this plugin. Fantastic! It works very well and adds more functionality to sites which use lots of Pages rather than just Posts.
06:31 on July 16th, 2008
I’ve just tried this plugin out,the latest version and I still experience the problem that was mentioned earlier.
Tags that are used in only pages, do not show up in the tag cloud.
Any fix for this?
Thanks.
10:40 on July 17th, 2008
Michele, I don’t know what I’d do without you. Your many plugins have really helped improve my blog. Thanks again.
19:25 on July 24th, 2008
Update - tested this and it works on WP 2.5.1 - some themes may have to be modified for tag clouds, etc to make it work properly. That is a theme problem and not a problem with the plugin at all.
23:01 on July 28th, 2008
Yeah this plugin is the bomb, especially if you have a lot of pages instead of posts (wordpress as a content management system etc..) makes the search much more useful.
08:03 on July 29th, 2008
hi this is nice plugin…it has solved my lots of problems related to pages and it’s functionality ..
thnx guys
22:25 on August 7th, 2008
Hi there — I have a website with a lot of pages. I’m trying to use this plugin and wp_query to add the three newest posts with a certain tag to a section on the front page. Here’s the code I’m using (hope this shows up):
have_posts()) : $the_query->the_post();
$do_not_duplicate = $post->ID;
?>
<a href="" title=""><img src="/images/strelica2.gif" width="6px" height="5px" alt="" />
Unfortunately, nothing shows up. I tried adding that tag to a blog post, and it showed up. So, these page tags aren’t being treated as being the same as blog post tags. Do you know any way around this?
PS - I tried the Simple Tags plugin as well — it worked the same way.
22:25 on August 7th, 2008
Eh … that code didn’t show up right. You get the idea.
10:57 on August 14th, 2008
[...] Tag4pages 1.1 or higher [...]
10:15 on August 29th, 2008
[...] Plugin tag4pages von Michele Marcucci entpacken und die php-Datei in das Plugin-Verzeichnis laden. Im [...]
21:48 on September 12th, 2008
tags on static page, never imagine,, but now its true, well thank alot bro…
http://info.biofircenter.com
03:24 on September 21st, 2008
thank you for nofallow link
17:47 on September 23rd, 2008
Thanks, Michele, nice plugin. Now if I could only create an RSS feed for the tags I place on the page (different from post tags), I’d be in business!
;-)
01:10 on September 24th, 2008
[...] tags4page - tags4page allows you to finally add tags to your pages as well as your posts to make them appear in tag clouds and be friendlier to search engines. [...]
02:10 on September 24th, 2008
[...] tags4page tags4page te permite por fin añadir etiquetas a tus páginas y publicaciones para que aparezcan en nubes y sean más fáciles de encontrar en los motores de búsqueda. [...]
02:15 on September 24th, 2008
[...] la atención Page Restrict, para restringir el acceso a los que están registrados en el blog, y tags4page , para añadrir tags a las páginas. A lista de Mashable añadiría los [...]
02:31 on September 24th, 2008
[...] tags4page - tags4page allows you to finally add tags to your pages as well as your posts to make them appear in tag clouds and be friendlier to search engines. [...]
05:25 on September 24th, 2008
[...] tags4page - tags4page allows you to finally add tags to your pages as well as your posts to make them appear in tag clouds and be friendlier to search engines. [...]
08:56 on September 25th, 2008
[...] tags4page [...]
23:10 on September 25th, 2008
[...] tags4page - tags4page allows you to finally add tags to your pages as well as your posts to make them appear in tag clouds and be friendlier to search engines. [...]
14:09 on October 2nd, 2008
[...] tags4page [...]
06:12 on October 7th, 2008
شبكة مصر
http://www.egy4vip.net/vb/index.php
11:48 on October 7th, 2008
Very usefull plugin thank for the job
16:25 on October 7th, 2008
[...] tags4page: The tags4page plugin supports a native tagging system for posts as well as pages to make them appear in tag clouds and be friendlier to search engines. If you are want to make increased use of pages and how to add tags to pages created in wordpress so you should used this plugin it makes easier your work . [...]
13:02 on October 12th, 2008
thanks.I’ll try the plugin
12:50 on October 18th, 2008
Its a great post and useful also because today everybody want to buy shopping goods online.
Thanks for such an helpful post.
16:27 on October 23rd, 2008
[...] tags4page [...]
12:03 on October 26th, 2008
Thanks very much for this plugin, will impliment as I need it!
20:22 on October 27th, 2008
Will try this plugin. Tags is good
01:27 on October 30th, 2008
I was able to install the plugin no problem. Thank you
08:32 on October 30th, 2008
Great plugin - I will immediately install it on my blogs!
23:08 on October 30th, 2008
Yes! Thank you.
21:44 on October 31st, 2008
I’ve been looking for a plugin like this. Thanks so much. I haven’t displayed tags on my blog for a while… at least since the WP 2.3 update.
04:11 on November 7th, 2008
[...] tags4page [...]
04:44 on November 7th, 2008
[...] tags4page [...]
07:19 on November 7th, 2008
This is absolutely the best plugin that is available for Wordpress. It should really not be a plugin but part of the Wordpress system. I built my blog around static post with pages ( articles ) to support the post. i had to way to tie them together until tags4page. Don’t forget to put in your function where needed and you will be happy.
THANKS
JIM
18:17 on November 7th, 2008
I agree Jim. Why this isn’t a stock feature of WP is beyond me. Nevertheless, thanks Michele for the great info!
13:30 on November 10th, 2008
Amazing how people are so talented in coming up with this kind of plug-in. Great share!
08:54 on November 15th, 2008
Great post here. I enjoyed reading.
Unlimited Movie Downloads
02:06 on November 16th, 2008
thanks for this helped me out
thanks
22:35 on November 16th, 2008
Tags for pages coupled with a couple of other plugins and then some minor additions to my BLOG.PHP file and now along with categories and related post (articles) I have a tags display in the meat section. If you look at the ‘LANDSCAPES’ category on home page and click landscapes tag you will get
pages and post. I still need to organize again around this new addition.
ENJOY
18:44 on November 18th, 2008
thank you so much for this! valuable indeed.
17:18 on November 19th, 2008
Hello,
This plugin is great, one problem I found in WP 2.6.2.
To display the tags on page you have to insert something like
However when visiting a tag page i.e. http://stcssafety.com/tag/nebosh-international
a second line of tag words is automatically added. If I delete/remove the part I manually added the the page then the tag words are also remoed from the page however are correctly displayed in the tag url and there is no repeating of the tag words.
Does any one know how I can have my tag words on page without duplicating the tag words when visiting the tag url pages??? maybe something like:
if (is_tag()){
echo “”;
}
else {
echo “.the_tags().”;
}
Thanks for the help
17:23 on November 19th, 2008
Hi Guys,
I just tested the above code and it works - it didnt display correctly above so i’ll re-type here what i replaced the usual code with the following code :
<?php if (is_tag()){
echo “”;
}
else {
echo “”;
echo “the_tags()”;
echo “”;
}
Now I don’t get doubled of the tag words in the tag urls :-)
19:21 on November 21st, 2008
Hi guys!
The plugin doesn’t work with WP 2.6.3.
Any Fix?
Thanks
10:53 on November 24th, 2008
@Cutox yes the plugin doesn’t work in WP 2.6.3
08:33 on December 9th, 2008
Hi, This plugin is great, Great share!
Thank You..
12:29 on December 23rd, 2008
ciao,
scusa sono neofita di wordpress… ho installato il tuo plugin però non so cosa voglia dire “aggiungere la funzione al thema”…
quindi funziona ma non riesco a fargli visualizzare i tag
il sito è su altervista se questo può “aiutarti ad aiutarmi”
Ciao e grazie
14:55 on December 26th, 2008
Will try this plugin, Thank’s…
16:26 on January 6th, 2009
thanks for this helped me out,i will try it
18:38 on January 6th, 2009
hello, michelem.. first of all thanks for this wonderful plugin… but i have a problem.. i have installed wordpress 2.7 on my website with wp_cumulus_cloud plugin.. So, can you please tell me How to work your plugin with above things…
Thanks in advance..