Skip Navigation

[Gelöst] Need help with Toolset Contractor style site.

This support ticket is created vor 2 Jahre, 4 Monate. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 10 Antworten, has 2 Stimmen.

Last updated by Alok Sharma vor 2 Jahre, 4 Monate.

Assisted by: Waqar.

Author
Artikel
#2217553

Ref: https://toolset.com/forums/topic/need-help-with-toolset-contractor-style-site/

I was not well and hence couldn't reply to the previous ticket, and the ticket got closed. It will be better if this ticket is assigned to Waqar.

I will list the problems one at a time so that it is easy to answer them.

I have embedded the edit user profile form (for users CPT) in a page and when I view the page, I get the message “Form type and post type do not match”. I believe this is happening because the page doesn't know the post_id of the user which needs to be edited.

I am thinking that instead of storing the user profile in a CPT, why not use the WP's default user table and add the desired user custom fields. But this approach comes with its own difficulty like adding & removing the portfolio items and linking user preferred WP themes & plugins with the user.

Is there any work-around to this issue?

#2218105

Waqar
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and hope you're feeling better now.

When you need to edit a post using the Toolset's edit form on a different page (i.e. other than its single post page), you need to specify the target post's ID through the "post" attribute.
( ref: https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred_form )

Suppose I have a post edit form with the slug "form-to-edit-post" and on a test page, I have to use it so that it edits the post with ID "1". The form's shortcode, in this case, will be:


[cred_form form='form-to-edit-post' post='1']

You can embed the edit user profile (CPT) form in the same way. And the current user's user profile CPT can be acquired using the custom shortcode that I suggested in my other reply:
( ref: https://toolset.com/forums/topic/need-help-with-toolset-contractor-style-site/#post-2211641 )

Example:


[cred_form form='edit-form-slug' post='[current_user_profile_id]']

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#2218659

Hi,

I am feeling better, thanks 🙂

With all the information you have provided so far, I was able to achieve a lot of things. I was able to create the required forms, pages, content templates etc with conditional validation.

Please allow me a day or two to give a final touch and get back to you for the next part.

Thanks.

#2219295

Waqar
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

You're very welcome and please take your time.

#2220105

I have completed most of the basic part. The only complex part is assigning WP Themes & Plugins with the user and their portfolio.

In the other thread, you suggested that using custom taxonomies has several benefits than using CPT's.

I went ahead and tried out custom taxonomies, but it comes with its own problems, for e.g.,

a. The user can create their own custom taxonomies, which I don't want. A user should be able to select only the pre-defined custom taxonomies.

b. A user can add any number of WP Themes as custom taxonomies, but for the portfolio, they should be able to select only one WP Theme as custom taxonomy. A WP site cannot be build using more than one theme, so this could be a concern.

c. Even if we are able to figure out a work-around for a & b, it will still increase my work because when I add a WP Theme or Plugin, I would also have to add their corresponding custom taxonomies. And then I will also need to find a way to display the actual post when a user clicks on the custom taxonomy. For e.g., GeneratePress theme would also have GeneratePress custom taxonomy. So when a user clicks on the GeneratePress, I would want to open the GeneratePress post directly.

These are some of the problems I encountered if going with custom taxonomy. If it is easy to overcome these issues, then nothing like that, and I will happily implement custom taxonomies.

#2222025

Waqar
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

taxonomy-field-form.png

Thanks for writing back.

a. When adding a taxonomy field in the Toolset Form, it is possible to disable the creation of new terms.
( please refer to the attached example screenshot )

b. When adding a taxonomy field in the Toolset Form, you can set it to show as a select/dropdown, which will limit the selection to only a single item.
( please refer to the attached example screenshot )

c. My suggested approach only involves adding themes and plugins as terms in their respective custom taxonomies. You won't need to add individual posts for them.

Here is what I wrote about this point in the previous ticket:
"If you'll use the taxonomies for the themes and plugins, you can still show information about an individual theme or plugin on its term archive page and taxonomy terms also support custom fields."
( ref: https://toolset.com/forums/topic/need-help-with-toolset-contractor-style-site/#post-2211641 )

#2222097

a & b. Thanks. My bad, I really didn't notice it earlier.

c. I did have a thought that custom taxonomies would work independently as if they are posts, but I was somewhat confused.

However, the above approach could create a small problem. I have added a new CPT viz Developers. This would allow the theme & plugin developers to submit their themes & plugins to the directory. If I go with the custom taxonomy approach, then the Developers won't be able to submit themes & plugins to the directory.

Besides, I would also like to introduce a new CPT viz End-users so that they can post their comments & ratings on themes & plugins. I believe with the custom taxonomies approach, a different modification would be required to allow the end-users to post their comments & ratings on themes & plugins.

I am sorry for all the complications, but once the approach is clear, I would be able to manage the rest.

#2223069

Waqar
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

No worries and no matter which of the approaches you finally adopt, it will come with its own set of challenges. But is a good thing to try to evaluate beforehand, which path leads to lesser challenges and which if those can be overcome through less complicated workarounds.

> However, the above approach could create a small problem. I have added a new CPT viz Developers. This would allow the theme & plugin developers to submit their themes & plugins to the directory. If I go with the custom taxonomy approach, then the Developers won't be able to submit themes & plugins to the directory.

- You can create a simple CPT to collect the information about the themes and plugins from their developers. Once any submission is approved, the site's admin can add its term entry in the relevant custom taxonomy.

> Besides, I would also like to introduce a new CPT viz End-users so that they can post their comments & ratings on themes & plugins. I believe with the custom taxonomies approach, a different modification would be required to allow the end-users to post their comments & ratings on themes & plugins.

- You can add a new CPT for 'comments & ratings' and make sure that the custom taxonomy for themes and plugins is attached to it.

While adding a comment or rating entry, the user can select the term for the theme or plugin to show what this particular comment or rating is about.

#2224257

Thank you for clearing out all the doubts. As suggested, I am working on both the approaches to see which one best meets the requirements.

Moving to the next issue. On the Edit Profile page, I would like to display a list of WP Themes & Plugins the user has associated themselves with, along with a button to disconnect the respective WP Theme or Plugin. In this case, I am using WP Themes & WP Plugins CPT's.

Can you please guide me here?

#2224665

Waqar
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

As this thread has become long, I've created a new ticket for your recent question.
( ref: https://toolset.com/forums/topic/split-showing-the-list-of-related-posts-and-the-button-to-disconnect-them/ )

You're welcome to mark this ticket as resolved and start a new one, for each new question or concern.

#2226837

My sincere apologies, I got confused whether I should ask each related query in a new thread or the same thread as these queries are all co-related to the main topic.

However, I will keep this in mind and open a new thread for each query.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.