Gatsby:如何让 ACF(高级自定义字段)与“gatsby-source-wordpress"一起工作?插入? [英] Gatsby: How do you get ACF (Advanced Custom Fields) to work with "gatsby-source-wordpress" plugin?

查看:35
本文介绍了Gatsby:如何让 ACF(高级自定义字段)与“gatsby-source-wordpress"一起工作?插入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试按照本教程进行操作,但它使用的 API 版本比当前版本要旧得多,因此无法正常工作:

I tried following along to this tutorial but it is using a much older version of the API than the current version so it didn't work:

https://www.youtube.com/watch?v=8PAV_9JKW48

推荐答案

好的,显然你需要 WPGraphQL用于高级自定义字段插件使其工作.

Ok, so apparently you need the WPGraphQL for Advanced Custom Fields plugin for it to work.

GitHub 发布页面,然后通过上传 zip 文件夹(插件 > 添加新 > 上传插件)将其安装到您的 WordPress 实例中.

Download the latest version as a zip from the GitHub releases page, then install it into your WordPress instance by uploading the zip folder (Plugins > add new > Upload Plugin).

确保在您创建的任何高级自定义字段上选中在 GraphQL 中显示"复选框,否则它们不会出现在 GraphQL 输出中.

Make sure that the "show in GraphQL" checkbox is checked on any advanced custom fields that you make or they won't appear in the GraphQL output.

这些是让一切顺利运行所需的所有 WordPress 插件:

These are all the WordPress plugins that you need to make everything run smoothly:

安装完所有内容后重新启动 Gatsby.

Restart Gatsby once everything is installed.

这篇关于Gatsby:如何让 ACF(高级自定义字段)与“gatsby-source-wordpress"一起工作?插入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆