Getting the posts current category ID (2 posts)

  1. dizzy100
    Posted 8 years ago #

    Ok ive tried lots and lots of things, searched extensively here and tried more sql than I care to think of but this is beyond me.

    I have posts that are in multiple child categories but i want to display some random posts from the currently active posts child category. So all i need is to retrieve that posts currently active child category ID.

    I've tried the global $cat but that just returns the parent category and not the currently viewed child category.

    Is there anyway to retrieve the current viewed posts child category id ?

  2. MacDoodle
    Posted 7 years ago #

    Was there ever any resolution to this? I'm having the same problem. Need to get the current post category id.


Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.