darkly77’s solution worked for me in ACF PRO 5.12 where Jann’s ‘acf/pre_load_post_id’ filter solution did not. The ‘acf/pre_load_post_id’ filter wasn’t working when using get_field on terms, resulting in this error:
PHP Fatal error: Uncaught Error: Object of class WP_Term could not be converted to string in /public_html/wp-content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php:77
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users