The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Tabbed Category List for Custom Post Types (2 posts)

  1. digitalrenewal
    Posted 5 years ago #

    Hope someone here can help me. Ive been commissioned to convert a template to wordpress that includes a portfolio...

    I built a portfolio page from a custom post type. that works.
    Items are categorized with a custom taxonomy named port_cats. that works also

    On the portfolio page, there is tabbed content built with jquery to show and hide items by category. So theres a category nav menu, plus each item wrapped in classes to show and hide.

    Im stuck on plugging this in correctly, and am SO CLOSE. I have the category nav list working, but having trouble getting worpress to read the correct category slug inside the loop.

    Heres how the jquery needs to work:

    for the menu:
    <li><a href="#" rel="category-slug">Category Name</a></li>

    to hide and show the items:

       <li class="category-slug">

    Heres my code:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Whats happening is that worpdress is repeating the last category slug on every display item...
    can anyone tell me what i have wrong here???


  2. digitalrenewal
    Posted 5 years ago #

    ok, ive pasted the code into pastebin here

    to clarify, what Im trying to do is echo a custom category slug to use it as a class identifier.

Topic Closed

This topic has been closed to new replies.

About this Topic