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 - 706 through 720 (of 725 total)
Problem:
What are the options for displaying different content to different users on the front-end?
Solution:
To display different content on the front-end according to some criteria you essentially have two options.
If the thing being tested relates to the person doing the looking (the user browsing the website is registered and has a certain role because they have paid for a particular membership, for example) then you can use Access to restrict the visibility of whole pages, or to selectively show certain content on a page (as described here: https://toolset.com/documentation/user-guides/access-control-texts-inside-page-content/).
If the thing being tested relates to the thing being looked at then you would need to add custom fields to the content being viewed and then use the wpv-conditional shortcodes to test the content of those custom fields and selectively display what is wrapped in the shortcode, as described here: https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
Problem:
How to create a lead capture form that first captures the email before the rest of the content is submitted?
Solution:
I would have the visitors create just a single post.
You have a CRED form to publish an initial post and this form contains only a field for the email.
The user enters their email address and submits the form.
On completion you redirect to a CRED Edit form which edits the post you just created, and which includes the other fields you want the users to complete (and displays the collected email address without being able to edit it).
When this form is submitted you just have all the info in a single post.
Problem:
Con forme CRED che hanno delle immagini, non posso caricare quelle immagini.
Ho disattivato il Upload con AJAX, ed adesso non posso piu caricare nessuna immagine con CRED.
Dallaltro lato, se CRED non ha una immagine e il post e creato, si duplica nel backend.
Solution:
Sono due problemi conosciuti.
Cuando le "errata" qui abasso sono "Solved", il problema sara corretto nel plugin, fino a quel punto, per favore applica le soluzioni spiegate nelle Errata.
I am trying to output the value of a parent post field within a new / edit child post CRED form using [cred-post-parent get="id"] as below, but I cannot get it to work.
If your CRED form is set to work with a child post type that has more than one parent, you must use the post_type attribute. Additionally, it is not possible to get parent information from multiple parents but only one.
So you will need to setup the shortcode, like this:
2) And the shortcode [cred_post_parent] does not support shortcode within shortcode feature, you can try with another Views shortcode [wpv-search-term], for example, replace this line from:
Problem: I would like to add a registration form that allows people to claim ownership of a post. Once an admin approves their ownership, the registrant becomes author of that post.
Solution:
If I were trying to do something like this, I would follow this process:
- Create a new CPT called Pending Approvals
- Add custom fields to the Pending Approval CPT - user ID, university ID, college ID, and school ID
- Use cred_save_data to create a Pending Approval post whenever someone submits the User Registration form while trying to claim ownership of a University, College or School.
- Save the new User's ID and the appropriate University, College or School ID in the Pending Approval post
- Create a View of Pending Approval posts. In the Loop of results, include a "Delete Post" link that can be used to decline the ownership request. Also include an Edit CRED form that edits the University, College, or School. Hide or remove all the visible inputs from this form except the submit button, and give it a name like "Approve Ownership"
- Use the cred_save_data hook to update the University, College, or School post author when this form is submitted, and trash the Pending Approval post.
- Insert the View of Pending Approval posts in a page that is restricted to site administrators.
Problem: I would like to create CRED forms where a parent CPT can be edited, and child CPTs for that parent can be added or modified.
Solution: Create separate CRED forms to manage the parent CPT, and to create child CPTs. Use the CRED create child link shortcode to link to the child CRED forms. Hide the parent selector using conditional HTML when the parent parameter is present in the URL.
Problem:
The client has related posts whereby child posts may be authored by different users than the parent post. The child post authors should be notified whenever the parent post is edited.