Created
July 30, 2024 18:13
-
-
Save kimcoleman/8ef061e66b499387364dd167e2457274 to your computer and use it in GitHub Desktop.
Show the First and Last Name fields in a single column
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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