I am experiencing some weird behavior on my video hero’s on my sub content pages.
I have the videos actually embedded on Wordpress itself and have it coming through form HTML2React content.rendered.
When I navigate from Home > Property Owners, the correct hero video loads on Property Owners, but when I navigate from Property Owners > Renters, the video does not switch to the renters Hero video unless I refresh the page. Same thing the other way around.
No matter which way I navigate to Property Owners or Renters, the correct video hero should load.
Here’s a repo of my code. This code lies in the Sub.js template:
Here’s what the live pages look like, notice when you click from home to property owners to renters, and home to renters to property owners, the video hero doesn’t switch:
- Home Page Link: https://guestrealty-35icxd1bo.vercel.app/
- Renters Link: https://guestrealty-35icxd1bo.vercel.app/sub/for-renters/
- Property Owners Link: https://guestrealty-35icxd1bo.vercel.app/sub/property-owners/
And here is what the actual Wordpress page looks like
- Property Owners: https://guestrealty-71f30a.ingress-comporellon.easywp.com/sub/property-owners/
- Renters: https://guestrealty-71f30a.ingress-comporellon.easywp.com/sub/for-renters/
Do I have to prefetch or do some beforeSSR magic on this? I don’t know how to approach this.