Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save thomasplevy/41f0d424051e52a6da3a to your computer and use it in GitHub Desktop.
Save thomasplevy/41f0d424051e52a6da3a to your computer and use it in GitHub Desktop.
<?php
// add an action to the hook
add_action( 'lifterlms_register_form', 'my_custom_lifterlms_registration_fields' );
// create the function that add_action will call
// this function should echo or output html
// the HTML below follows the format of the other fields LifterLMS outputs by default
function my_custom_lifterlms_registration_fields() {
?>
<div class="llms-form-item-wrapper password">
<label for="my_field"><?php _e( 'A Custom Field', 'my_text_domain' ); ?></label>
<input type="text" class="input-text llms-input-text" name="my_field_name" id="my_field" />
</div>
<?php
// if you want to create more than one field go ahead!
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment