TagPages - Tags functionality for pages in WordPress 3.0

Hi WordPress Community,

This is a follow-up to my post which I wrote a few years ago. – The idea was (and still is) to equip pages with tags and include them with the total count in a combined posts and pages tag-cloud.

In the most recent update, WordPress 3.01, there is still no option to enable tags for pages. – Anyway, the taxonomy-code in WordPress got more flexible since I wrote my post about tagging pages in WordPress 2.3.

So, there are good news: The code of the WordPress-core doesn’t need to be changed manually anymore. Instead there is handy new function

register_taxonomy_for_object_type($taxonomy, $object_type)

in taxonomy.php which we can use.

Long story short, you can download the plugin TagPages on my projects page.

Kudos go to the WordPress devs for the improved flexibility of the taxonomies.

Greetz,
Berny

2 Responses to “TagPages - Tags functionality for pages in WordPress 3.0”

  1. luxusdisco
    luxusdisco
    luxusdisco probably commented in Hungary says:

    I have a little problem, (not with the plugin), but I cant build it to my page well.

    I would like to build the tags into my pages list (sidebar/menu).

    My idea is:

    Pages Menu:
    – page 1 (page 1’s tags)
    – page 2 (page 2’s tags)
    – page 3 (page 3’s tags)

    How can I do it?
    Could you help me?

  2. Berny
    Berny
    Berny probably commented in Thailand says:

    Hi luxusdisco,

    To produce an unordered list of all tags in the sidebar, you could include a call to wp_tag_cloud. If you set format to list it will produce an unordered list.

    For example: wp_tag_cloud('format=list&smallest=10&largest=10');

    If you want to display a pages-list together with your tags you can use get_posts to retrieve a pages-list outside of the loop and call the_tags on every iteration after setup_postdata. Have a look at the examples of get_posts.

    greetz,
    Berny

Leave a Reply

You must be logged in to post a comment.