Hi,
I tried this and it nicely modified the mc4wp top bar even with ‘mctb_before_ email_field’ and translating “your name”.
However there was no transfer to mc although fname and lname were defined in mc.
Here is the script:
<?php /** * Echo a NAME field just before the submit button. */ add_action( ‘mctb_before_ email_field’, function() { echo ‘<input type=”text” name=”FNAME” placeholder=”Vorname” />’; echo ‘<input type=”text” name=”LNAME” placeholder=”Nachname” />’; }); /** * Make sure the content of the NAME field is sent to MailChimp * * @param array $vars */ add_filter( ‘mctb_data’, function( $vars ) { $vars[‘FNAME’] = ( isset( $_POST[‘NAME’] ) ) ? sanitize_text_field( $_POST[‘NAME’] ) : ”; $vars[‘LNAME’] = ( isset( $_POST[‘NAME’] ) ) ? sanitize_text_field( $_POST[‘NAME’] ) : ”; return $vars; });
Does anybody have a hint?