I want to be able to edit the post_parent of a custom post type. Basically in my use case I want to mimic how WordPress uses attachments: have a custom post type that is sort of a subtype to post or any other post type. WordPress uses the post_parent field on the wp_posts table to link attachments to their parent posts so I want to be able to do the same. I’ve tried to use wp_update_posts but it seems to time out the connection when I try to call it during a post save. Is there a way of editing the post_parent directly?
Leave a Reply
You must be logged in to post a comment.
Hi @Manny Fleurmond:
You can add the following HTML to a post metabox you’ll have an edit field that lets you edit the raw
post_parent
ID. Maybe with this knowledge you can build what you need?If I well understood the question you can set support for page-attributes when you register a CPT like this:
A listbox will appear in the manage post page.