Skip Navigation

[Resolved] Membership to allow access to front-end editing of specific posts.

This support ticket is created 6 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 2 replies, has 2 voices.

Last updated by Tim Elliott 6 years, 6 months ago.

Assisted by: Nigel.

Author
Posts
#672664

Tell us what you are trying to do?
The site has various CPTs; Tools, Agencies, Jobs, Resources.

Users will be able to use fornt-end forms to submit tools, agencies, jobs or resources.
These will go into "Under Review" status until approved by an admin.
After a submitted custom post is approved they will be able to front-end edit the single tool/job/resource they have submitted, but not the others in the same CPT
They will also be able to purchase a premium listing for the Posts that they submit to either add additional fields or make it a featured listing.

For Tools and Agencies (design agencies) we will add a load of listings at the start. The client wants users to be able to click a "Claim this listing" button and submit information to prove they are the owner of the tool or a representative of the agency. Once the claim is approved the user will be able to log in as a member, and have front-end access to edit just that single Agency as if they'd submitted it themselves.

I'm not sure if it can be done using CRED and Access alongside Woocommerce.

My client has suggested using a separate membership plugin such as hidden link or hidden link but I'm not sure if this will just create even more problems.

Any insights you have would be gratefully received.

Is there any documentation that you are following?
I've read through both of these but not sure if they will allow me to do what I want.
https://toolset.com/documentation/user-guides/charging-payments-with-cred-to-register-users/
https://toolset.com/learn/create-membership-site-wordpress-using-toolset-plugins/

Is there a similar example that we can see?
This plugin seems to do the kind of thing we're after, but we want to do it through Toolset.
hidden link

What is the link to your site?
This is the staging site but it is in maintenance mode at present.
hidden link

#673200

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

This sounds mostly achievable, though you may need a little custom coding as the glue to hold it together.

When posts are successfully claimed you would make the user the post author, so that you can then filter by post author when you want the user to only see posts they can edit.

The question is how you would handle claiming the posts. An option would be to make a claim-this-listing form which published a "claim" post type, that was a child of the type of post being claimed. So you would have a button that linked to the form, the form would collect the required data and would include a field for the parent post being claimed, and a notification email to tell the site administrators of a new claim. When they review the claim post they could then change the post author to the user making the claim. (Naturally this involves some admin work in the back end.)

As described in the documentation links you shared, you can have different levels of users—standard and premium—that have different capabilities when it comes to the content they create.

I think the claiming-issue is the key question, but if you have a specific question then let me know.

#870244

Hi Nigel
Thanks for your first answer - I've got a good way down the road with doing this now but have a specific problem with the way I'm doing something. Perhaps you can help me do what I want, or give me a nudge towards a different way to achieve what I'm trying...

So as it stands a user can create an account and log in (to a new user role called CPT owner).
Once they are logged in they can see the Claim form and submit it for admin approval.
Once approved the admin sets the user as the post author.
Now that they're the post author they can see the edit post form that allows them to update the post.

All well and good....

The next part is having premium fields. I have a field called "free-premium", and certain other fields are only visible/editable if this is set to premium. This part works OK.

The difficulty is getting the user to purchase the "premium listing" so that the filed is set to premium and the fields editable.
As it stands I have a simple cred form - it looks like this:

  [credform class='cred-form cred-keep-original']
  [cred_field field='form_messages' value='' class='alert alert-warning']
  <div class="form-group" style="display:none;">
    [cred_field field='free-premium' post='tool' value='premium' urlparam='' output='bootstrap']
  </div>
  [cred_field field='form_submit' value='Upgrade to Premium' urlparam='' class='btn btn-primary btn-lg' output='bootstrap']
  [/credform]

So the form has the free-premium field set to premium, but this is hidden by the display:none. The user just has to submit the form. The form is linked via "Charge payment with this form" to a Woocommerce product and is directed immediately to the checkout page.

In theory this works OK as long as they pay, but if they don't complete payment, the form has already been submitted and recorded the "free-premium" field as premium.

I see I can change "Post status when the payment status updates", but I don't want to change a post to "Pending Review" as then Guest visitors won't be able to see the post - I'd still want them to see the post, just not the premium info.

So is there any way I can do this with the cred form - i.e. if the customer fails to complete checkout, instead of changing the post status to "Pending" or "Draft" it just changes the free-premium field to free?

If not, how should I restructure this bit of the process to allow users to purchase premium in this way?

Sorry for the long post. If you need log in details to see what I'm talking about on the staging site let me know.

Thanks
Tim