Created
October 15, 2020 16:11
-
-
Save sabrina-zeidan/85a8e4b0a6658c9ccbf9a3bc4934605e to your computer and use it in GitHub Desktop.
ACF form inside a shortcode (buffering) otherwise broken XML sitemaps, headers already sent etc
This file contains 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
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