How to set child post categories to parent post categories when updating parent post?

So I was able to temporarily achieve the functionality I needed by pairing the set_parent_terms function in the top section of code, which fires only when the child posts are saved, with a completely different function I managed to scrape together, that merely auto-saves the child posts when the parent post is saved. See completely separate solution here, which triggers the update of the children required by the first function above.

Still looking for an answer to the above to wrap it all into one function.

Leave a Comment