Hiding Dynamic Page elements based on URL

Thanks @gladen - you’ve pointed me in the right direction and a quick glance of the API documentation helped to lead me to the following code:

$w.onReady(function () {
    HideElements();
    });
        
function HideElements () {
 let url = wixLocation.url;
 if (url === "https://www.mywebsite.com/mydynamicpage/02")
    {
        $w('#image1').hide();
        } else {
        $w('#image1').show();
        }
        }