03/02/2017 at 3:38 pm
#413621
Keymaster
@ PatriciaB
It pretty much exactly how you registered the custom field to show in the list and the example in the tutorial you followed.
add_filter( 'cncsv_map_import_fields', 'cncsv_remove_header_name' );
function cncsv_remove_header_name( $fields ) {
unset( $fields['honorific_prefix'] ); // Removes name prefix from drop down
unset( $fields['middle_name'] ); // Removes middle name from drop down
unset( $fields['honorific_suffix'] ); // Removes name suffix from drop down
// var_dump( $fields );
return $fields;
}
You can uncomment the var_dump command and if you visit the mapping page it spew out a list of the field ids on every row. You can use that to tweak the filter to remove the items you do not want.
Hope this helps!
