Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember General Questions › eMember – serve snippet of video to non-logged in users, full video to members? › Reply To: eMember – serve snippet of video to non-logged in users, full video to members?
^^^Scratch that question above, I’m going to go the conditional blocks route you recommended. I’d like your opinion on my method, please. First, I installed a plug-in that allows me to place php in posts. Then, I put this in a post using the HTML editor:
[php]<?php if(!wp_emember_is_member_logged_in()) { ?>[/php]***embedded YouTube video***[php]<?php } ?>[/php]
[php]<?php if(wp_emember_is_member_logged_in()) { ?>[/php]
[video mp4="http://mydomain.s3.amazonaws.com/my-video.mp4" width="640" height="480" preload="auto"]
Download this entire video in MP4 format – perfect for your iPad, iPhone or your PC/Mac.
[wp_eStore_add_to_cart id=3]
[php]<?php } ?>[/php]
Are their any security issues that I should be aware of? Will non-logged in members be able to view source and get the S3 video link from the code? Also, is there really not a way to do this out-of-the-box? I would think this type of functionality would be built in, i.e. a custom fields box (or something similiar) to serve content to logged-in members, and then another for non-logged-in members content. Right now the only other way to do this that I know of is to create two posts for each type of member…
Anyway, Please let me know if I’m doing this right. Thanks!