Support » Fixing WordPress » Get categories of posts as slugs

  • Resolved carbonmadex

    (@carbonmadex)


    Hello,

    I have a site which has portfolio as a parent category. And it has child categories like “a”, “b”, “c”.

    Portfolio
    -a
    -b
    -b

    I would like to get all of the posts from portfolio category. And I want category slugs to be generated as post class. And for example when a post is assigned under both “a” and “b” categories I want both of them to be generated except parent category portfolio:

    <div id="post-1" class="a b">content</div>

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Get categories of posts as slugs’ is closed to new replies.