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
$block = get_post( 123 ); // Change 123 to the unique post ID for your block | |
echo apply_filters( 'the_content', $block->post_content ); |
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
<script> | |
// For standard forms | |
jQuery( document ).on( 'gform_post_render', function( event, form_id, current_page ){ | |
gformInitChosenFields( '#field_12_10 select', 'No results matched' ); // Change selector to #field_FORMID_FIELDID | |
}); | |
// Forms that use multiple pages and ajax | |
jQuery( document ).on( 'gform_page_loaded', function( event, form_id, current_page ){ | |
gformInitChosenFields( '#field_12_10 select', 'No results matched' ); // Change selector to #field_FORMID_FIELDID | |
}); | |
</script> |
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
add_action( 'gform_after_submission', 'wpsunshine_gf_after_submission', 10, 2 ); | |
function wpsunshine_gf_after_submission( $entry, $form ) { | |
add_filter( 'body_class', function( $classes ) { | |
return array_merge( $classes, array( 'gf-submitted' ) ); | |
} ); | |
} |