• Resolved troyblakelyd

    (@troyblakelyd)


    I am trying to register custom fields to the wp-graphql plugin with ACF. Per the documentation, fields can be registered in PHP by adding:
    'show_in_graphql' => true, 'graphql_field_name' => 'myGroup',

    I added these attributes to the admin_cols collection of the custom post type defined with poet, and it doesn’t seem to be recognized by wp-graphql. I’m not sure if this is an issue with poet, extended-cpts or wp-graphql, but any suggestions would be appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jason Bahl

    (@jasonbahl)

    @troyblakelyd could you maybe share a full code snippet?

    I’ve never used poet, but I imagine it would work fine with WPGraphQL.

    I’m not sure “admin_cols” is the right place to add these fields though. They should be at the root of the post type.

    If poet isn’t passing those fields through to the underlying register_post_type() then I would recommend opening an issue with Poet.

    Thread Starter troyblakelyd

    (@troyblakelyd)

    In the end I was unable to figure out how to make it work with Poet, etc so I just registered the custom post type and custom fields the “usual” way in setup.php.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘ACF + extended cpt + poet’ is closed to new replies.