Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1340438
    Paul H
    Participant

    Hi

    I use Restrict Content Pro to restrict content on a subscription site and it works well although I want to check some changes I will be making to restrict portfolio content before I mess up my site with my limited coding knowledge.

    Apparently, I need to add a function to the portfolio template although am not sure if what I am about to do is correct. I have been told to add:

    <?php if ( rcp_is_active() || ( rcp_get_subscription_id() && ‘free’ === rcp_get_status() ) ) : ?>
    <p>This content is restricted to active paid and active free subscribers.</p>
    <?php endif; ?>

    Will it work if I change the template-layout-portfolio.php file to:

    <?php

    // =============================================================================
    // VIEWS/INTEGRITY/TEMPLATE-LAYOUT-PORTFOLIO.PHP
    // —————————————————————————–
    // Portfolio page output for Integrity.
    // =============================================================================

    ?>

    <?php get_header(); ?>

    <?php if ( rcp_is_active() || ( rcp_get_subscription_id() && ‘free’ === rcp_get_status() ) ) : ?>

    <div class=”x-container max width offset”>
    <div class=”<?php x_main_content_class(); ?>” role=”main”>

    <?php x_get_view( ‘global’, ‘_portfolio’ ); ?>

    </div>

    <?php get_sidebar(); ?>

    </div>

    <?php endif; ?>

    <?php get_footer(); ?>

    Thanks!

    #1340440
    Christian
    Moderator

    Hey there,

    Regretfully, this particular customization request is outside the scope of our support as this is not related to an issue with the theme and instead has to do with your customization of it. As such, you will need to investigate this particular issue on your own or seek help from a developer should you not feel comfortable making these changes yourself. If you have any further questions about the theme, we are more than happy to provide you with assistance on these inquiries.

    Thank you for your understanding.

    #1340444
    Paul H
    Participant

    I did contact the developer and they were extremely helpful. What I am really asking is if the template-layout-portfolio.php is the file that outputs the portfolio content or if there is another or others that are involved. I don’t have a problem messing around with the code, I am just wanting to be sure of how the theme’s portfolio content is output.

    Thanks

    #1340449
    Christian
    Moderator

    If you’re looking to modify the single portfolio page, the file you need is content-portfolio.php located in themes\x\framework\views\integrity. The file contains this code

    <?php x_get_view( 'global', '_content', 'the-content' ); ?>

    which you can further dig deeper into. The code means get global/_content-the-content.php.

    See https://community.theme.co/kb/customization-best-practices/ to learn how to customize X.

    Thanks.

    #1340450
    Paul H
    Participant

    Awesome, thanks!

    #1340452
    Christian
    Moderator

    You’re welcome.

  • <script> jQuery(function($){ $("#no-reply-1340438 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>