Skip to content

Add a button to create a new related post under the meta box #65

@PypWalters

Description

@PypWalters

Is your enhancement related to a problem? Please describe.

It would be a UX improvement to have the option to create a new related post from within the post meta box of another post. The use case is if you need to relate a post to another post that does not yet exist. We could create a button, that when clicked, hits a custom endpoint that will create a new post (of the appropriate CPT based on the relationship settings) and automatically create the relationship. The endpoint will then return the ID of the new post, and open the editor for that new post in a new tab. It will also need to update the "Related Posts" listing in the post where it was originally created.

Designs

The design for the button would be similar to the "+ Add New Category" button for taxonomies, except it would open the cpt in a new window since a CPT would have a lot more details to fill in.

what-is-a-taxonomy-1

Describe alternatives you've considered

We could just add a filter at the bottom of the render function ( https://github.com/10up/wp-content-connect/blob/master/includes/UI/MetaBox.php#L40 ) and allow developers to add whatever they would like under the meta box, but it would be difficult to trigger a refresh of the related post list.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions