I’d like to obtain the current category ID (outside the loop) and was wondering if a metatag exists for this purpose? If not, is it best to get it straight from the page’s POSTDATA, or is there another way to get it? (the original the_catagory_ID() is deprecated and needs to be used within the loop).
Also, how do I obtain a category parent’s ID, not a list of names like get_category_parents() will do, but just an ID?
Am I correct in assuming that the top-level category ID, the category where all highest level categories belong to, is 0? Or is this something else or undefined?
I’m trying to make my theme interact a bit more with the stuff readily avaible from the wordpress database. I wonder if I need to get down and do some programming myself or if neat and tidy, and moreover debugged and tested, functions already exist.
Lastly I would like to influence the way ‘the loop’ works by sorting my home page firstly on top-level categories, and only then in order of publication. Is there a way to do this?
- The topic ‘Category meta-tags available?’ is closed to new replies.