• Resolved Shnipsel

    (@schnipsel13)


    Is it possible to get the most popular terms of all children of a category?

    Use case: A directory of business listings with deep category structure. Listings are assigned to some of those deep categories, but not necessarily to the root categories.

    When providing cat=”1″, can I somehow (perhaps with a hook) expand the category selection to 1 plus the whole branch of children and grand-children?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @schnipsel13,

    No, unfortunately there is no hook to directly change the category ID on the fly.

    If you need to change it dynamically then using the shortcode isn’t the best way to go about it. Might want to consider using the wpp_get_mostpopular() function instead, that way you could use PHP to obtain the current category ID and pass it to the function so it returns the right set of posts.

    Thread Starter Shnipsel

    (@schnipsel13)

    Hi Héctor,

    I like the idea! Will try to build my own shortcode with all the dynamics and default arguments needed.

    Thanks for the cool plugin and support!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Children of Category’ is closed to new replies.