Create a gist now

Instantly share code, notes, and snippets.

Add additional Lead Fields to WordPress Lead Profiles for WordPress Leads Plugin
* Add in custom lead fields to WordPress Leads Plugin
* This function adds additional fields to your lead profiles. Insert this code into functions.php of your theme
* Label: Name of the Field
* key: Meta key associated with data
* priority: Where you want the fields placed. See for current weights
* type: type of user area. 'text' or 'textarea'
add_filter('wp_leads_add_lead_field', 'custom_add_more_lead_fields', 10, 1);
function custom_add_more_lead_fields($lead_fields) {
$new_fields = array(
'label' => 'Upper Company',
'key' => 'wpleads_upper_company',
'priority' => 18,
'type' => 'text'
'label' => 'Lead Source',
'key' => 'wpleads_lead_source',
'priority' => 19,
'type' => 'text'
'label' => 'Description',
'key' => 'wpleads_description',
'priority' => 19,
'type' => 'textarea'
foreach ($new_fields as $key => $value) {
array_push($lead_fields, $new_fields[$key]);
return $lead_fields;

This comment has been minimized.

Show comment
Hide comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment