Skip to content

Instantly share code, notes, and snippets.

@kimcoleman
Created July 30, 2024 18:13
Show Gist options
  • Save kimcoleman/8ef061e66b499387364dd167e2457274 to your computer and use it in GitHub Desktop.
Save kimcoleman/8ef061e66b499387364dd167e2457274 to your computer and use it in GitHub Desktop.
Show the First and Last Name fields in a single column
<?php
/**
* Show the First and Last Name fields in a single column
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*
*/
function my_pmpro_element_class_an2c( $class, $element ) {
if ( 'pmpro_an2c' === $element ) {
$class = array();
$class[] = 'pmpro_form_fields';
}
return $class;
}
add_filter( 'pmpro_element_class', 'my_pmpro_element_class_an2c', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment