Created
February 16, 2020 07:23
-
-
Save cameronjonesweb/5e0948b93cbda5284841bd3ba68d638f to your computer and use it in GitHub Desktop.
Render the_content in a gravity forms field
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
<?php | |
$form_id = 1; | |
$field_id = 1; | |
add_filter( "gform_field_content_{$form_id}_{$field_id}", 'gfield_render_the_content', 10, 5 ); | |
function gfield_render_the_content( $content, $field, $value, $lead_id, $form_id ) { | |
$content = apply_filters( 'the_content', get_the_content() ); | |
return $content; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment