How to setup my first pay per view page for admin to add videos weekly

I wanted to know how to use the ppv plugin to make all videos uploaded to the site require payment. I want the admin to be able to access a frontend page upload videos and they automatically are added to the PPV content. Please and thank you

  • Kasia Swiderska

    Hello Reyna,

    If you keep those videos as separate posts or custom post types then you can modify template in theme that handled those videos.
    Please see on usage page https://premium.wpmudev.org/project/pay-per-view/#product-usage under the Using Pay-per-view Directly In Your Templates
    You will see there sample code:

    <?php
    if ( function_exists( 'wpmudev_ppw_html' ) ) {
    $html = '<iframe width="560" height="315" src="http://www.youtube.com/embed/-uiN9z5tqhg" frameborder="0" allowfullscreen></iframe>'; // html code to be protected (required)
    $id = 1; // An optional unique id if you are using the function more than once on a single page
    $description = 'video'; // Optional description of the protected content
    $price = '1.50'; // Optional price for a single view. If not set, price set in the post will be applied. If that is not set either, Unit Price in the Global Settings will be used.
    echo wpmudev_ppw_html( $html, $id, $description, $price );
    }
    ?>

    this line

    $html = '<iframe width="560" height="315" src="http://www.youtube.com/embed/-uiN9z5tqhg" frameborder="0" allowfullscreen></iframe>'; // html code to be protected (required)

    should be replaced with code that generates your videos.

    Other than that there is no way to do that automatically, because Pay Per View works on shortcodes inserted in post/page content.

    I apologize I cannot give more specific information, but I don't know how your theme and adding videos works.
    If you will have trouble implementing that code would you mind allowing support access so we can have a closer look at your settings?
    To enable support access you can follow this guide here:
    http://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    kind regards,
    Kasia

    • Reyna Creamer

      Thank you Kasia Swiderska for your quick reply. I am currently using the SiteOrigins "North" Theme. I have enabled support on my WP. please feel free to poke around and let me know what you think will work. If you feel you need to make a quick added page to by all means please do so. Also, what do you mean by code to generate your video? If the PPV plugin doesnt do that then where might I find a way to generate a code for these videos (If you have any suggestions).Thank you again.

  • Nithin

    Hi Reyna Creamer,

    Hope you are doing good today. :slight_smile:

    It seems like the support access is not working, please revoke, and re-enable support access, so that the support access works.

    Also, what do you mean by code to generate your video?

    The $html variable should contain the code that outputs the video in your themes template. That's what Kasia meant by code to generate your video. You'll have to find the code which displays the video, and pass it to the variable $html, as shown in the above example.

    If the PPV plugin doesnt do that then where might I find a way to generate a code for these videos (If you have any suggestions).

    I'll have to check how the video is being added. If it's part of your theme, you'll have to find the template where the code to output the video is added. Since, it's a premium theme, I'm not sure how that works. How are you adding your video? Is it part of your themes custom post type? If yes, you can edit the themes custom post type template.

    Please let us know once you enable support access, so that we could give a look on how the videos are being added. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.