01/23/2026
https://clickfoundry.co/blog/adding-barba-js-to-the-wordpress-framework/
đ Adding Barba.js to a Custom WordPress Theme
Iâve rebuilt WordPress base theme and and integrated Barba.js for smooth, app-like page transitions.
Barba is easy on static HTML sites. WordPress? Not so much đ
The challenge is getting Barba to play nicely with WordPressâs dynamic templates, plugins, and script loadingâwithout breaking transitions or double-initializing JS.
In this post I walk through:
⢠How WordPress templates actually map to Barbaâs wrapper vs container model
⢠Where Barba belongs in header.php, index.php, page.php, etc.
⢠Enqueuing Barba + GSAP the âWordPress wayâ (no package manager rage)
⢠Using namespaces to control transitions cleanly
⢠A simple GSAP transition demo (ketchup & mustard vibes đ)
⢠Real-world issues: plugin re-initialization, script lifecycle problems, and why things like Contact Form 7 silently break if youâre not careful
This setup powers page-to-page transitions on humnlab.com, including homepage â project animations, and itâs now my go-to foundation for high-end client builds.
If youâre building custom WordPress themes and want SPA-style transitions without ditching WordPress, this oneâs for you.
đ Full walkthrough + code samples on the blog
(And if youâve fought Barba + WP before, drop your pain points in the commentsâIâm collecting them.)
Learn how to integrate Barba.js with WordPress for smooth page transitions. Complete tutorial with code examples, template structure, and GSAP animations.