CRED plugin allows you to build forms that create child posts and set parents for these posts, supporting the parent-child relationship functionality from Types plugin.
When you ask for help or report issues, make sure to tell us the structure of your content and the relationship between the content types.
Viewing 15 topics - 256 through 270 (of 306 total)
Problem: I would like to show a Form that will create a child post and automatically link that post to the parent post where the Form is shown.
Solution: Add a generic field in the Form and set the value using wpv-post-id and the $current_page operator. Then use the Forms API cred_save_data to trigger the post relationships API toolset_connect_posts, connecting the new post and the post where the Form is shown.
Problem: I would like to prevent my site Users from creating more than one child post for a given parent post.
Solution: Create a Form that creates new child posts. Create a View of child posts, filtered by post author, where the author is the same as the current logged-in User, and also filtered by post relationship as related items of the post where the View is shown. In the "no results found" section of the View of child posts, insert the Form to create new child posts. Now the Form is only shown to those Users who have not yet created a child post for the current parent post.