Comments 1intel started the conversationNovember 6, 2020 at 10:54amDear Zhivkois it possible to remove button +New Organizer from front end? I don't want that other user can add new organizer, but instead need to choose predefined. Best RegardsDzemal 894Zhivko repliedNovember 7, 2020 at 2:40pmHi,Well, you could do it like you've done it now via css display none.Additionally you could add server side check just in case someone unblock the button.Place the code in your theme or child-theme functions.php file: add_action('init', function() { function disable_new_organizers() { if ('insert_new_organizer' === filter_input(INPUT_POST, 'task')) { echo wp_json_encode(array( 'error' => 1, 'error_msg' => 'New organizers are not permitted', 'data' => [] )); exit; } } add_action("wp_ajax_nopriv_stec_public_ajax_action", function() { disable_new_organizers(); }, 1); add_action("wp_ajax_stec_public_ajax_action", function() { disable_new_organizers(); }, 1); }); This will prevent adding new organizers from the front-end. Stachethemes Developer Sign in to reply ...
Dear Zhivko
is it possible to remove button +New Organizer from front end?
I don't want that other user can add new organizer, but instead need to choose predefined.
Best Regards
Dzemal
Hi,
Well, you could do it like you've done it now via css display none.
Additionally you could add server side check just in case someone unblock the button.
Place the code in your theme or child-theme functions.php file:
This will prevent adding new organizers from the front-end.
Stachethemes Developer