[Membership 2 Pro] Protect Videos from Viewing

I am implementing Membership Pro 2. We have some Vimeo videos we want to protect on the site with a free membership level. I am not certain how to do this. I attempted to wrap the video in a shortcode ([ms-protect-content id="1" access="yes" silent="no"]). So I put the aforementioned shortcode on the page using Elementor, then the video item, then attempted to put on the closing shortcode. Again, using Elementor. It did not seem to work. So does anyone have any idea how to have the videos display on a page, but protect them so the end user has to log in to view them?

  • Adam Czajczyk
    • Support Gorilla

    Hi Clay Hess

    I hope you're well today and thank you for your question!

    The protection shortcode is a "two part" (enclosed) shortcode and if it's "spread across multiple modules" on the page, it's not processed properly by WordPress.

    This is more of an Elementor issue rather than Membership 2 Pro. Unfortunately, it means that protecting Elementor's "video" module that way is not possible.

    However, videos can still be protected if you use a native WP embed capability. If you put a YouTube URL (that works with Vimeo too, I think) directly into the WP text (post/page) editor and press enter, the video will automatically be embedded. If it's wrapped with Membership 2 Pro shortcodes, it will also be protected - as long as shortcodes and the video itself are inside the same Elementor's "text" block.

    So, here's what you could do:

    - place a "Text Editor" module on a page where you want you video to be located
    - put the video along with protection shortcodes into it like this:

    [ms-protect-content id="123"]

    Of course, replace 123 with an ID of your membership, please :slight_smile: Take a look at the screenshot below:

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.