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 480 total)
Problem: I have 2 post types in a many-to-many relationship. In a form that creates custom post type #1, I would like to be able to choose 3 items from CPT #2 to relate to the new post.
Solution: It's not currently possible to manage M-2-M relationships in a new post Form or an edit post Form. The best way to manage M2M relationships is to use Relationship Forms. You can also use generic fields and custom code with our PHP APIs.
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.