Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter naysilva

    (@naysilva)

    I’ve just realised that this only works on pages that use the ‘Default Template’, for the above page I am using the ‘Shop’ template, how can I make the restriction work for pages that do not use the default template?

    I’m currently having the same issue. It looks like you found a fix, care to share?

    Thread Starter naysilva

    (@naysilva)

    Not so much a fix, more a laborious workaround. I just wrapped the template pages with the following (Below the header and above the footer):-

    <?php if(pmpro_hasMembershipLevel(array(1,2))) { ?>
    
    // TEMPLATE CONTENT
    
    <?php } ?>

    Then added the following at the bottom of the page:-

    <?php
    	if(!pmpro_hasMembershipLevel(array(1,2))) { ?>
                 <?php include 'subscribe-options.php'; ?>
    <?php } ?>

    I added subscribe-options.php in the root directory just so I didn’t have to repeat the content within all the pages I had to include this in.

    That’s what I was afraid of. I’m going to jump into the plugin files soon and see if I can figure out what’s going on.

    Thanks though. I’ll reply here if I come up with a fix.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Paid Memberships Pro] Restricted Pages not working’ is closed to new replies.