The process is similar to the last recipe, in which we defined a custom shortcode and a callback function. We are using the shortcode to generate the search and list. Use the following steps to understand the process of building the user list and search:
- Inside the shortcode callback function, we add a basic HTML form with a label, text field, and Submit button, and assign it to a variable that returns the shortcode output.
- In the next step, we use the code to start the searching process. We start by checking the availability of a search value, using isset($_POST['wpccp_user_search']). Once the user has submitted a search value, we use the sanitize_text_field function to filter out any unnecessary characters that might create ...