Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ACF form inside a shortcode (buffering) otherwise broken XML sitemaps, headers already sent etc
add_shortcode( 'acf_registration', 'acf_registration' );
function acf_registration() {
$args = array(); //arguments here
ob_start();
acf_form( $args );
$registration_form = ob_get_contents();
ob_end_clean();
return $registration_form;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.