0

I am currently developing a Gatsby site with Wordpress as a headless CMS. Our customer wants to manage events, for which I use The Events Calendar as a plugin. To be a bit more flexible, I have also integrated Advanced Custom Fields, so that as soon as the customer creates an event, an event page is generated.

So far so well the queries in graphql are displayed to me except for the custom fields. I have already adapted the PHP template from single-event.php so that the content of the custom fields is currently displayed on the wordpress page (hero_text), but not in graphql to query. Is there anyone who has experience with it or has already had the same problem?

graphql image

ksav
  • 20,015
  • 6
  • 46
  • 66
Niklas
  • 1
  • 1
    Does this answer your question? [How to expose all the ACF fields to Wordpress REST API in both pages and custom postypes](https://stackoverflow.com/questions/56473929/how-to-expose-all-the-acf-fields-to-wordpress-rest-api-in-both-pages-and-custom) – ksav Sep 29 '20 at 14:14
  • Unfortunately not because I'm looking for a solution to how Advanced Custom Fields are displayed in the query of the allTribeEvents plugin – Niklas Sep 30 '20 at 08:39
  • What is the `allTribeEvents plugin`? You don't mention it in your question. – ksav Sep 30 '20 at 09:33
  • i'm sorry https://www.gatsbyjs.com/plugins/gatsby-source-tribe-events/ – Niklas Sep 30 '20 at 09:43
  • Hi, I am one of the Lead developers in the Modern Tribe team that is behind The Events Calendar. I wanted to make sure the solution I provide you actually solves the issues, which plugins are you using to handle your GraphQL data generation on the PHP side? Once I have that I can probably provide you with a filter to include your ACF data. – Bordoni Sep 30 '20 at 15:18
  • I tried with multiple like (gatsby-source-wordpress, wp-graphql) but only the gatsby-source-tribe-events shows the data from the-events-calendar or did you mean something else? – Niklas Sep 30 '20 at 15:44
  • Can you work with that? – Niklas Oct 01 '20 at 13:51
  • So it's a very custom solution which my guess the best way to solve that would be by doing something like what is suggested here: https://javascriptforwp.com/extending-wpgraphql-for-custom-meta-boxes-with-react-and-apollo-in-a-wordpress-theme-tutorial/ – Bordoni Oct 01 '20 at 19:22
  • So I understand correctly, you can integrate the Advanced Custom Fields plugin into the events calendar, but you cannot display them in any way? There are several custom fields such as speakers where data such as images and links have to be transferred, which is a bit difficult with your proposal, that's why the custom fields are so essential for us. This guide is about the fields of normal posts – Niklas Oct 02 '20 at 13:36

0 Answers0