GithubHelp home page GithubHelp logo

Comments (5)

FloLech avatar FloLech commented on May 25, 2024 6

I had the same problem and did the following to make it work:

In library/class-acf-to-rest-api-recursive.php go to line 19 and add your cpts to the $types array. This will add them, so they are handled by the plugin.

$types = array( 'options' => 'options', 'comments' => 'comments', 'users' => 'users', 'custom_menu' => 'custom_menu', 'custom_dish' => 'custom_dish' )

from acf-to-rest-api-recursive.

rbaugh avatar rbaugh commented on May 25, 2024 3

Seems to be an issue with the after_setup_theme action. It seems to be too early in the lifecycle in which the CPT doesn't get created yet. I changed it to init and set the priority value to 1000 to make sure it is last in the list of init calls. This makes it to where the CPT should be created.

Looks like this was identified here as well:
joshuafredrickson@84f119e

from acf-to-rest-api-recursive.

rbaugh avatar rbaugh commented on May 25, 2024

Seems to be an issue with the after_setup_theme action. It seems to be too early in the lifecycle in which the CPT doesn't get created yet. I changed it to init and set the priority value to 1000 to make sure it is last in the list of init calls. This makes it to where the CPT should be created.

from acf-to-rest-api-recursive.

MaximBuldov avatar MaximBuldov commented on May 25, 2024

Has anyone solved this problem?

from acf-to-rest-api-recursive.

tariky avatar tariky commented on May 25, 2024

Seems to be an issue with the after_setup_theme action. It seems to be too early in the lifecycle in which the CPT doesn't get created yet. I changed it to init and set the priority value to 1000 to make sure it is last in the list of init calls. This makes it to where the CPT should be created.

Looks like this was identified here as well: joshuafredrickson@84f119e

Just do this

from acf-to-rest-api-recursive.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.