Someone asked how you could load your own custom scripts and styles on a Fluent Form conversational form landing page since using the default wp_head()
and wp_footer()
functions from WordPress don’t get called.
Fluent Forms does however have their own hooks we can use to inject custom scripts and styles into the header and footer of the page.
Header hook
You can use the hook fluentform_conversational_frame_head
to add CSS or Javascript to the header of the page.
<?php // Adds code to header add_action('fluentform_conversational_frame_head', 'tct_conversational_header_script') function tct_conversational_header_script(){ ?> <style> /* Add your CSS here */ </style> <script> // Add your javascript here </script> <?php }
Copy
Footer hook
You can use the hook
to add CSS or Javascript to the footer of the page.fluentform_conversational_frame_footer
<?php // Adds code to footer add_action('fluentform_conversational_frame_footer', 'tct_conversational_footer_script'); function tct_conversational_footer_script(){ ?> <style> /* Add your CSS here */ </style> <script> // Add your javascript here </script> <?php }
Copy