A plugin I’m developing registers two custom post types: Class
and Student
. Both are connected via the post_parent
property in the Student
post type (one student belongs to one class). I added a SelectControl
control to the PluginDocumentSettingPanel
in the Student
post type edit screen to be able to set a Class
for the Student
.
Everything is working except the saving part. The changes are not saved. Any ideas?
Thanks in advance
UPDATE: The previous code is correct, but one needs to expose the parent field for non-hierarchical post types using the register_rest_field()
function (Props to @Sally CJ):
- Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
- Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
- Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.
Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com