Change page url when Content Area Modal is closed

Hey team,

I am using the content area modal as a sort of lightbox for some videos on my site. I am using the content area modal because the video is held within a shortcode that displays the content on a schedule.

You can see it all function here:

If you choose a Play Video button you will see the lightbox open and a video will display, but only if it meets the scheduler’s criteria.

So, the question I have is about how the c.a.m. functions. Since it is button activated, I am using an anchor. But, when it closes the url remains …org/#
This is a problem because a user may want to re-open the c.a.m. after closing it. Since the url is already pointing to the anchor, the c.a.m. won’t re-open until another button is pressed or the screen is refreshed.

Can I

  1. have a way that closing the c.a.m. changes the url without refreshing the page
  2. have shortcode for a classic player lightbox or similar solution? I don’t want to use embed so that we can keep people on our site instead of youtube.

Thanks for your help

Right! :man_facepalming: I just needed to replace the modal toggle with text. Glad I recognized that before you had to tell me.

Glad you sorted things out,

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.