@triggator/public-nav-embed
v1.0.25
Published
Builds `NavBar` (isLoggedIn=false) as a UMD bundle for use in WordPress/Thrive Themes.
Readme
@triggator/public-nav-embed
Builds NavBar (isLoggedIn=false) as a UMD bundle for use in WordPress/Thrive Themes.
Build
npm run build:public-navOutput: dist/public-nav.umd.js
WordPress Integration
1. Deploy the bundle
Copy or symlink dist/public-nav.umd.js into the WordPress theme's assets directory or serve it from the existing nginx static path.
2. Enqueue in functions.php
wp_enqueue_script(
'triggator-public-nav',
get_template_directory_uri() . '/assets/js/public-nav.umd.js',
[],
'1.0.0',
true
);3. Register shortcode in functions.php
add_shortcode('triggator_nav', function() {
return '<div id="triggator-public-nav"></div>';
});4. Place in Thrive
Drop [triggator_nav] into the Thrive header template or header.php.
