Buttons on user role base

i´m using taskhive. I figured out that if people are freelancer, they are getting the userrole “employees” in wordpress. User which are creating requests are on “subscriber” userrole.
Is there a way, to show the buttons “List a Service” and “Post a Request” based on userrole?
Is there also a way, to give people the option to choose their userrole on registration?
thanks in advanced!
best Martin

ciao, vai su wordpress, utenti, tutti gli utenti, scegli utente, modifica, cambia ruolo in contributore.

thanks, but that is not really a solution with more than 100k users.

ok, in general settings set the default role of new users.

that´s also not really a solution.
I have both. People who are posting requests and people who want to offer some services. for each one i need a different menu and buttons. also different checkboxes on registration to make it right regarding gdpr and the rights here in austria.
that’s why i’m asking regarding this conditional buttons.
i tried to make it with custom header in elementor but after that, it destroys the whole other css of the site.

It’s possible to hide these buttons with CSS, but then users will not be able to register as vendors unless you use a separate page with some contact form for this purpose. The Add Listing button basically means “become a vendor and add the first listing” - if you approve the first listing, then user gets a vendor profile and the status is changed to Contributor automatically. Also all vendor specific account pages will be displayed automatically, e.g. Dashboard (if you use Marketplace), posted offers, orders, etc. So if you hide the default buttons you’d have to add another way for users to ask to become a vendor, and change user roles manually.

I highly recommend keeping the current workflow because it’s fully automated and based on intended actions, e.g. if user tries to add the first listing they are basically registered as a vendor along the way. You can add vendor-specific checkbox (e.g. with terms) as a vendor attribute, or if you require at least 1 listing from vendors you can use a single Terms page with vendor terms and set it in HivePress/Settings/Listings/Submission section.

Hope this helps.

Hi @ihor ,
Thank you for your feedback.
I understand what you mean. Unfortunately, we need this strict separation of suppliers and clients so that the platform complies with our terms and conditions.
Our providers are still partially checked, but the clients are not. Hence the buttons based on the user role.
My idea would have been to replace the current registration form with gravity forms and assign the user role in advance.

Is there a solution to show or hide the respective buttons depending on the user role?

If not, is there a way to make the header & footer builder for elementor compatible with the theme?

thanks in advance!

Please try using the PHP and CSS snippets suggested here Disappeared dashboard from vendor - #8 by DDV Unfortunately there’s no 100% integration with Elementor yet, but we’re working on it.

1 Like


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.