[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.
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.
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:
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.
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.
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.
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.
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.
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?
New threads created by Waqar and linked to this one are listed below:
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.