Closed pvdptje closed 5 years ago
I'm testing a bit, and i can't seem custom fields to get to work.
My code:
PT::make('brand', 'Brands', 'brand') ->setLabels(['add_new_item' => 'Add a new brand']) ->setArguments([ 'public' => true, 'menu_position' => 20, 'supports' => ['title', 'editor', 'post-thumbnail'], 'rewrite' => false, 'query_var' => false ])->set(); Metabox::make('properties', 'brand') ->add(Field::text('test')) ->set();
The metabox is visible on the edit screen, however the fields do not get loaded. When inspecting in console we see a 404 error: Error: Request failed with status code 404
Error: Request failed with status code 404
It's trying to do a call to http://mydomain.dev/wp-api/themosis/v1/metabox/properties?post_id=18 which gives a 404.
Any suggestions on how to fix this?
Thanks
I have saved my permalinks and the fields are now visible.
I'm testing a bit, and i can't seem custom fields to get to work.
My code:
The metabox is visible on the edit screen, however the fields do not get loaded. When inspecting in console we see a 404 error:
Error: Request failed with status code 404
It's trying to do a call to http://mydomain.dev/wp-api/themosis/v1/metabox/properties?post_id=18 which gives a 404.
Any suggestions on how to fix this?
Thanks