How do I show errors after validation with a custom form frontend?

This is a pretty basic solution. First I am assuming that you are not saving the data/form, and just returning to the same page.. In your $formContent you would do something like this. <?php $formContent=” …. <tr> <th><label for=”email”>Förnamn*</label></th> <td><input name=”first_name” id=”first_name” value=”” class=”regular-text” . $class_errors[‘first_name’] . ‘” type=”text”>’ . ( array_key_exists( ‘first_name’, $class_errors ) … Read more

auto assign sequence base username while registration

This all depends on how users are being registered on your site. TLDR The code below allows you to create custom users from admin area specifying custom usernames, or use GENERATE_CUSTOM_SEQ_USERNAME to generate sequential numbered one. If using registration form other than wp-login.php just set user_login to GENERATE_CUSTOM_SEQ_USERNAME and hide the field using CSS. If … Read more

Payment on Registration?

Best way is to handle this with user roles. A user can register but not read. After paying with paypal, the role will be updated (e.g. from reader to subscriber). The update can be done through PayPals IPN. I made this for one of my clients. You will be paid by your customer. I will … Read more