SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Wordpress Genre

  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2009
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wordpress Genre

    Hello!

    I am running wordpress 2.7.0 and can not find a way to do what I would like to do.


    I would like to add a way to sort my posts, which are videos, by genre. If possible, I would like to have some way to included multiple genres. I do not wish to add the genres to each individual post, but if possible, i would like to add it to the category page.

    Thanks in advance

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Add the genres to the posts as tags, then you can use tag pages to display all the posts in a genre.

    Off Topic:

    The latest version of WordPress is 2.7.1

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2009
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dan,

    Thanks for another fast response!

    I have 2 questions about the tags:

    1.) Is there a way to add them to my category pages?


    2.) Is there a way that I could make it look for things with multiple tags? For example, I wanted to see everything that had the tag comedy and the tag romance.

  4. #4
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You can display the tags associated with a post using the_tags. All WordPress functions work across all theme files, so it doesn't matter if it's a category page.

    You'll probably need to code something to be able to retrieve posts with multiple criteria no matter how you store the criteria. It wouldn't be difficult, see query_posts and get_posts at the codex.

  5. #5
    SitePoint Enthusiast
    Join Date
    Apr 2009
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the link Dan.


    I see what you mean about the function working on all pages, but I still have a question.

    Is there a way to assign tags to a particular category and not a post within that category?


    If I used this code on a category page,

    PHP Code:
    <p><?php the_tags(); ?></p>
    Does that cause the category page to display all tags found on posts within that category or would nothing show up because my category page doesnt have any tags?


    Thanks again.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •