Viewing 2 replies - 1 through 2 (of 2 total)
  • not sure what you mean with ‘from the url’ but in a category archive page, you normally get the category id with:

    get_query_var('cat')

    Thread Starter mike2009

    (@mike2009)

    Thanks a lot for your time and help, kindly find my reply to your question below:

    All I am trying to do is the following:

    I have 4 major categories and many sub-categories under each of them…so I need to detect which ‘major category’ the visitor is currently browsing so that I can properly display its sub-categories in the side bar….got what I mean?

    Any ideas on how I can accomplish this will be highly appreciated

    Best Regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Get current category id from URL’ is closed to new replies.