Created
September 5, 2025 11:17
-
-
Save annuman97/e282bb0867cf053f4db0fd56f5082945 to your computer and use it in GitHub Desktop.
When you need to add external scripts to the community portal frontend.
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('fluent_community/portal_head', function () { | |
| wp_enqueue_script( | |
| 'my-ext-on-portal', | |
| 'https://cdn.example.com/sdk.min.js', | |
| [], | |
| null, | |
| false | |
| ); | |
| }); | |
| add_action('fluent_community/before_js_loaded', function () { | |
| echo '<script src="https://cdn.example.com/analytics.js"></script>'; | |
| echo '<script>window.MyAppKey = "PUBLIC_KEY_123";</script>'; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment