Add custom code to Fluent Community Portal

tdrayson

If you are looking to add custom code to Fluent Community portal, we can hook in to both the <head> and footer depending on where you need to load the content.

Add the code below to functions.php or code snippet plugin.

Insert into <head>

PHP

        /**
 * Add custom styling and scripts to the portal page
 */
function tct_fluent_community_portal_head() {
    ?>
    <style>
        /* Styling for the portal <head> section */
    </style>
    <?php
}
add_action('fluent_community/portal_head', 'tct_fluent_community_portal_head');
      
Copy
PHP

        /**
 * Add custom scripts to portal footer
 */
function tct_fluent_community_portal_footer() {
    ?>
    <script>
        // Custom JavaScript for the portal footer
    </script>
    <?php
}
add_action('fluent_community/portal_footer', 'tct_fluent_community_portal_footer');

      
Copy

👋🏻 Weekly Tutorial Digest

I send out a weekly newsletter with links to new tutorials written in the last week, you can subscribe below.

Newsletter

🔒I won't send you spam, I promise