Forum Replies Created
-
AuthorPosts
-
pionectMemberI thought to implement it server side, right after someone logged in.
pionectMemberWhen the user is logged in I’ll do a request to an external API to find out what WordPress should look like. The API is build upon a package which defines the CMS itself. So it’s perfectly possible that the user changed the CMS definition in that software. And when he/she logs in into WordPress I want to do an API call. Based upon the output I want to automatically create post types with metaboxes and fields. It seems that for Piklist this is only possible by generating files with comments. And the question is therefore “Is it possible to define metaboxes & fields without creating the files for them? Just like it’s possible with the post type filter”
pionectMemberHi Jason,
I’m trying to achieve something else.
An API returns a JSON like this:[ { "id": 1, "label": "Project pagina", "name": "project_page", "fields": [ { "id": 2, "label": "Beschrijving", "name": "description", "type": { "id": 3, "label": "Lange tekst", "name": "text" } }, { "id": 4, "label": "Onderhoud", "name": "maintenance", "type": { "id": 2, "label": "Korte tekst", "name": "string" } } ] } ]The first level shows a custom post type I’d like to add.
And the fields I’d like to add to a custom metabox for this specific post type.
I’m not able to create PHP files with comments without actually generating these files based on the API output.
But that’s a route I don’t want to take.
I was hoping that Piklist would be able to work like this framework does: http://framework.themosis.com/docs/metabox/
pionectMemberWell we don’t need help anymore considering this case but I would like to add that we would like to use a custom directory to store all the piklist files. And even better, we’d prefer to use code over comments to setup all fields/settings etc.
Thanks for your quick reply 🙂
pionectMemberThe problem seemed to happen because of a custom directory structure we implemented.
Apparently meta-boxes worked just fine but settings weren’t.
We disabled injecting our directory structure and now we copy the files to the theme directory with gulp.
pionectMemberThis reply has been marked as private. -
AuthorPosts