How to have the current categories (selected from the url) (2 posts)

  1. Riccardo Caroli
    Posted 3 years ago #

    Not all the post categories but the current ones...
    To explain better: I need to have a menu that shows active categories.
    - for example i go mysite.com/mycat/mypost
    - and since mypost is not only in mycat but also in other categories
    - i need to know what category "I'm in", seems that all the api gives me ALL the categories of the posts

    In short: I need something like get_query_var('cat') but that works on post pages.... also that works on mysite.com/mycat/mysubcat/mypost and gives me ONLY mycat and mysubcat.
    Any help will be much apreciated.

  2. nsathees
    Posted 3 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic