Comments (5)
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.
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.
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.
Has anyone solved this problem?
from acf-to-rest-api-recursive.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acf-to-rest-api-recursive.