Creating a “Tags” page with search option, instead of using a widget

I’ve searched for answers on that, not sure I found anything.

I have a blog about movies, and I’m using tags for actors (i.e. brad pitt, kevin spacey).

Read More

I’m interested to create a dedicated “actors” page, which will include:

  • a list of all the actors (= tags) alphabetically. So the tags list will be presented from A to Z.
  • a search form – so users can search for actors (= search the tag cloud).

I’m trying to search for plugins that can help doing this. Only found the nice Custom Tag Configuration plugin, but that’s not enough.

Any help on this?

Maybe the code for creating such a page shouldn’t be too difficult – would be glad to get some suggestions on that.

In any case, I believe that many blog owners would find such an option quite relevant for their blogs.

Thanks.

Related posts

Leave a Reply

2 comments

  1. Create a file in your theme called for example : myTagsPage.php

    in it paste the following code

    <?php
    /*
    Template Name: myTagsPage
    */
    <h2>Actors</h2>
    <?php the_tags('<ul><li>','</li><li>','</li></ul>'); ?>
    ?>
    

    then in administration, create a new blank page, on the right side, you should be able to choose which template you want – pick myTagsPage

    you can choose many functions, play with the parameters – i wrote a sample one

    check http://codex.wordpress.org/Function_Reference/the_tags

    I saw a plugin for this once, but i guess this is more flexible and you can customize it more 🙂

  2. This is just a partial answer, but I can flesh it out later if this is what you’re interested in doing:

    WordPress doesn’t search well by tags or any taxonomy terms; there just aren’t the api features built-in for it, and in any case its not really a logical way to go about it. If the tag is “Brad Pitt”, and someone searches for “Brad”, or spells the name wrong, you have to do a good bit of parsing or SQL %LIKE querying to get the results you want.

    A better way of doing something like this is with an autocompleter… There’s a very nice autocompleter module bundled with script.aculo.us, or if you prefer jquery, use the jquery autocomplete plugin. Either way, load up a variable with your tags using get_terms, localize your autocompleter with that variable, and you should have a fairly decent tag search right off the bat.