Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ACF fields not injected #27

Open
IlyaSemenov opened this issue Jun 20, 2022 · 1 comment
Open

ACF fields not injected #27

IlyaSemenov opened this issue Jun 20, 2022 · 1 comment

Comments

@IlyaSemenov
Copy link

IlyaSemenov commented Jun 20, 2022

Search results returned by this plugin don't include ACF (Advanced Custom Fields) fields.

Compare:

The former will include acf in the results, the latter will not.

I traced the reason, it turned out that ACF plugin only injects acf fields when it sees that a REST request is coming for a certain known post type: https://github.com/AdvancedCustomFields/acf/blob/ada1e58a2e5564e7d62ded661ebdaf6a153ccb1f/includes/rest-api/class-acf-rest-api.php#L60-L64

// If the object sub type ($post_type, $taxonomy, 'user') cannot be determined from the current request,
// we don't know what endpoint to register the field against. Bail if that is the case.

Any way to work around that?

I realise that this project is effectively abandoned but may be there's a recipe someone will be wanting to share?

@IlyaSemenov
Copy link
Author

I also opened an issue in ACF repo: AdvancedCustomFields/acf#667

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant