Support » Plugins » HACK: wp_dropdown_categories (will pay$ for code)

  • Resolved volleyballmaniac


    If anyone can figure this out I will PayPal you $50 for your troubles.
    (I know you have to take me at my word, but you might note that I have been a long-time member of this forum, and I’m here to stay)

    I realize that normally cash isn’t offered on this forum, but my question is rather unorthodox, and could be more complex than I thought (and I’m quite desperate). If you feel like this problem is worth more than $50, I’ll be willing to negotiate.

    If you’d rather deal with me directly, please email me at: volleyballmaniac [at] gmail . com

    Link to Example Page:

    You will notice on the above page that you are looking at the “Irish Pub” category.

    On the right-hand sidebar, you will notice a “Choose Location” dropdown. This was generated using the wp_dropdown_categories function. I set the parameters to return all sub-categories under the ‘Location’ category AND to show sub-categories only if they have at least one post. (Please select a location to see how I’m using it).

    It works as designed, but here is my issue: It lists ALL ‘Location’ sub-categories that have a single post EVEN if they don’t have a post in the “Irish Pub” category. So if a user clicks on “Agat”, they are taken to my custom “No Posts in this Category” Page. This can get very irritating for the user.

    Instead of listing ALL ‘Location’ sub-categories that have at least one post, I ONLY want it to list ‘Location’ sub-categories that have at least one post in the “Irish Pub” category as well.

    So if there are no Irish Pubs in “Agat”, then I don’t want “Agat” showing up in the drop-down.

    – I had a notion that I could auto-populate the ‘exclude’ parameter of wp_dropdown_categories, based on the present category being viewed, but I’ve no idea how to code this.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘HACK: wp_dropdown_categories (will pay$ for code)’ is closed to new replies.