Avada Forums Community Forum Combine A CPT, off-canvas popup and ACF to get dynamic video pop-ups

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • megabite
    Participant
    Post count: 9

    I want something I didn’t think would be very hard, but can’t see a way to make it work within the options/builder.

    The idea was to have a CPT ‘videos’, add a ACF field with the Vimeo video ID. (and some other fields/image etc.)
    Display them on a page in a grid using postcards.

    On that postcard I would have a button, upon clicking the button, the video from that post will be shown in a popup offcanvas Vimeo video element.

    I got most parts working, except for the video being loaded into the offcanvas Vimeo video element. I can get the popup to show, even the Vimeo player loads in, but with an error as there is no video ID.
    I’m missing an option/way to get the info (video ID) from ACF field of a post displayed in a postcard to the offcanvas video element.

    Any ideas? I’m quite comfortable adding some code to functions/or a plugin if need be. I could probebly program it all in a custom plugin. But it seems that virtually all elements I need for this are already present in Avada, so I would like to use that. Also makes it easier for others to edit/tweak it later on.

    megabite
    Participant
    Post count: 9

    I will answer my own question, as with a bit of help I came to a workable solution.

    Currently there is no way to pass the ID from the postcard post to the offcanvas pop-up.

    But you can simulate a popup effect with the lighbox, so instead of opening the offcanvas, we altered the dynamic link in the postcard to open the ACF field ‘video’ in a lightbox -> you only have to make sure that you add https://vimeo.com/ infront of the ID. This can be done at the CPT ACF field, but that would require everyone to add this to each post. So we choose to add this in the ‘before’ field, when picking the dynamic link ACF field.

    Works like a charm.

    You do give up some flexibility in what the popup looks like, but it works well enough.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.