Your cart is currently empty!
One of the key aspect of token gating is the ability to protect content from users who are not allowed to access it. By using the [looppress_media]
shortcode, you can stream images, video, and audio files to users who have it unlocked.
Step 1:
![](https://www.looppress.dev/wp-content/uploads/2023/09/Capturfdfdfde-2-1024x580.png)
Upload your protected media to the looppress media folder in the looppress admin dashboard under the looppress-> looppress media tab.
Copy the url to the file.
Step 2:
Create a new looppress post or navigate to the page where you want your content to be accessed.
Step 3:
Add the
shortcode to start a token gated section.[
looppress nft="nft id goes here"]
Add the [looppress_media type="video" src="paste url here"]
shortcode after the opening shortcode.
- the ‘type’ attribute defaults to image, but can be video, audio, or image.
- To display a download button and support other file types, such as .zip, .pdf, .obj, etc, follow the same instructions but use
[looppress_media_download]
shortcode.
Add the ending
shortcode to end the token gated section.[
/looppress]
![](https://www.looppress.dev/wp-content/uploads/2023/09/stream_example-1.png)
Working Example:
Here is a direct Link to the protected File -> https://www.looppress.dev/wp-content/plugins/LoopPress/protected-folder/intro_final.mp4 (It’s Forbidden)
Thats it! publish the post or page and test out your hard work!