0

i like to hide the booking_form_request by css when the user role is subscriber. please can you repair my code:

if( current_user_can('subscriber')) { 
   booking_form_request {
 display: none!important; 
1
  • How are you embedding the form? Is it via shortcode in the backend of the website or hard coded it in a page template? May 14 '20 at 14:33
0

Have you tried adding the PHP code onto the page where your form is? For example like this

<?PHP if( !current_user_can('subscriber')) { ?>
<form> 
...
</form> <?PHP } >?

This should only display the form to users that are not subscribers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.