bordoni/fakerpress

How do I use Fakerpress with taxonomy fields?

jmagill-platinumplatypus opened this issue · 2 comments

I have a custom post type Person with an ACF field Eye Color that is of type Taxonomy using a custom taxonomy that I created with CPT UI. Note that that taxonomy is set through the ACF field, not the typical Wordpress terms API. Save Terms is set to false so the terms are not saved to the post except through the field.

How do I get Fakerpress to populate this type of a field?

In theory, if the custom taxonomy is created with the base WP API, then there should be no issue in populating it. You'd probably populate them via the regular WP methods, because AFAIK the ACF part is just that: A specific setting for ACF / Meta Fields.

Of corpse, if this custom taxonomy of yours is completely unconnected to the specific CPT, it probably would fail (and also, that would NOT BE how you're supposed to use taxonomies).

The only other issue that could appear is mostly related with initialization of all the plugins involved - so eg. if Fakerpress gets initialized BEFORE CPT UI is, it might not "know" about the existence of the custom taxonomy (because it would not be registered in the system yet).

cu, w0lf.

Thanks for the quick response. If I understand you correctly, then I should be using a Meta Field Rule with the type set to WP_Query. Is that correct?