Quick Action Bar (Dynamic Pages)

I found in someone else’s question how to hide the quick action bar on pages you don’t want it to appear and it’s been working great!! However, it doesn’t seem to work for dynamic pages. Does anyone know how to hide this on dynamic pages?

Here’s the code I’ve been using for non-dynamic:

import wixLocation from ‘wix-location’;

if(wixLocation.path.length && wixLocation.path[0] === ‘url-slug’)
$w(’ #quickActionBar1 ‘).collapse();
$w(’ #quickActionBar1 ').expand();