Home Forums Front-end Issues Select2 not pulling saved values on MultiSite Reply To: Select2 not pulling saved values on MultiSite

  • Yes, prepare_field is probably the closes hook before it is rendered.

    I just had a look at the render_field function for the taxonomy field and found another place where there is likely an issue with the value not appearing.

    The render field function for the taxonomy field also cause ACF to check for valid terms. There are no hooks in the render field method of the field type that will let you filter this and show terms that do not exist on the current site.

    There are 2 options that I know of.

    The first would be to create your own field type based on the ACF taxonomy field and remove the code that tests the terms.

    The second would be a bit of a hack and I don’t know if it will work.

    Use the acf/render_field hook h While it is undocumented on this page, this hook also includes the field name and field key variations that all of the other field hooks include.

    Use this hook to create 2 actions, one that is fired before ACF (priority < 10) and one that is fired after ACF (priority > 10). In the first hook, switch to the main site and in the second hook switch back to the current site.