Restrict portfolio video

Hi,

I hope you can help me with the following although I’m not sure how much it has to do with the theme. For a client I want to use this theme to build a website with free and paid content with Woocommerce Memberships. Ideally I would have a page with video’s of which some are paid and others are free. I want to use the portfolio function for this. But when I make a portfolio video item and I restrict it, only the content below the header is restricted and not the embedded video itself. You can play it on the portfolio category page as well as in the item itself. See an example here: http://bit.ly/2w0VXvx (pass: check123)

Is there some way to include the embedded video in the restricted content so it is not possible to play it? Any help would be greatly appreciated!

Hello There,

Thanks for writing in! At the current setup, the featured image is separate from the content. I would recommend that you create two versions of your video. One is the preview which will be displayed and the other video is the full video will should be embedded in the content instead.

Hope this helps.

Hi RueNel,

Thanks, that might be a solution indeed. But then the preview would be promentently displayed on the item page instead of the actual video. Maybe I should just use post type video instead of the gallery then. There is no functionality in the theme for featured video instead of featured image, right?

Hello There,

If you will follow my suggestion, we can then hide the featured video when viewing the item page so that only one video will display on the page which is the one coming from the content. You can always make a little modification to the portfolio item page to make this possible. To do that, assuming that you already have a child theme installed, please follow the following steps below:
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file

<?php

// =============================================================================
// VIEWS/INTEGRITY/CONTENT-PORTFOLIO.PHP
// -----------------------------------------------------------------------------
// Portfolio post output for Integrity.
// =============================================================================

$archive_share = x_get_option( 'x_integrity_portfolio_archive_post_sharing_enable' );

?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

  <?php if ( ! x_is_portfolio_item() ) : ?>

  	<div class="entry-featured">
    	<?php x_portfolio_item_featured_content(); ?>
  	</div>

  <?php endif; ?>

  <div class="entry-wrap cf">

    <?php if ( x_is_portfolio_item() ) : ?>

      <div class="entry-info">
        <header class="entry-header">
          <h1 class="entry-title entry-title-portfolio"><?php the_title(); ?></h1>
          <?php x_integrity_entry_meta(); ?>
        </header>
        <?php x_get_view( 'global', '_content', 'the-content' ); ?>
      </div>
      <div class="entry-extra">
        <?php x_portfolio_item_tags(); ?>
        <?php x_portfolio_item_project_link(); ?>
        <?php x_portfolio_item_social(); ?>
      </div>

    <?php else : ?>

      <header class="entry-header">
        <h2 class="entry-title entry-title-portfolio">
          <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php x_the_alternate_title(); ?></a>
        </h2>
        <?php if ( $archive_share == '1' ) : ?>
          <?php x_portfolio_item_social(); ?>
        <?php endif; ?>
      </header>

    <?php endif; ?>

  </div>
</article>

3] Save the file named as content-portfolio.php
4] Upload this file to your server in the child theme’s folder wp-content/themes/x-child/framework/views/integrity/

Please let us know if this works out for you.