Advanced Post Creation add category [RESOLVED]

I use both the APC and Gravity Wiz Populate Anything here so I don’t know if this is an issue for this forum or for the wizard.
I am creating WooCommerce products from a gravity form, and is populating available categories in a drop down. If I set these with value “Name” it gets added as expected. But if i set them with value “Term ID” a new category is added with that number. For example is the new product added to a category namned “202” which is the term id for the category that is supposed to be correct.

The thing is that every category have sub-categories and these are populated in checkboxes when I select the parent category in the drop-down. And this population works great if I have the value as Term ID, but does not work if i set the drop down values with the name. Then I get all available terms in the checkboxes.

Do you see the issue here. Get the population right, but the post creation wrong. Or get the post creation right but the population of subcategories wrong.


  • How do I add a post to a category by the category ID?
  • How do I filter subcategories by the parent category name? (I can select this in the settings för Populate anything, but it does not seam to work.)


Hi SiKth I recommend opening a support ticket for this issue:

Thank you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

This came up recent in Gravity Wiz support and then another Populate Anything user wrote a snippet that we tweaked to solve this issue.

Sharing here for the OP and future seekers:

Worth noting, this does not require Populate Anything. It’ll work with any solution that populates choices with the term ID rather than the term name.

1 Like

Note that in the Advanced Post Creation Add-On as of v1.3, there is a new filter:


Allows users to modify which field is used when looking up terms via get_term_by(). Defaults to name, but can be any of: ‘slug’, ‘name’, ‘term_id’ (or ‘id’, ‘ID’), or ‘term_taxonomy_id’

If you have any questions about its usage, please start a new topic here or open a support ticket. Log In ‹ Gravity Forms — WordPress

Thank you.