WordPress.org

Ready to get started?Download WordPress

Forums

Listing subcategories with special conditions (1 post)

  1. taote
    Member
    Posted 6 years ago #

    I need to get the list of subcategories in a similar way like in Listing sub-categories and descriptions automatically, but showing only the categories that contains posts belonging to an specific category.

    This is because to add geolocation to the posts, I´m using the categories in the way Province > City > Area, and I want to get the subcategories of an specific category, but only those with posts including also a category that represents a city.

    I also need to know the number of posts, I cannot use the value saved in count in wp_term_taxonomy.

    Can anyone help me with the SQL query?

    Thanks!!

Topic Closed

This topic has been closed to new replies.

About this Topic