• Hi, I have installed the plugin and no matter what I do I just cant get it to work. I have set up all the pages with the shortcodes and assigned them, set the Digital Access subscription to forever duration and unlimited number allowed. I edited one of the pages of content and set the visibility to Always visible to Digital Access and no matter what I do I can still see the full page when not logged in.

    And then I had a thought, does this work with custom fields? The page content is not in a WYSIWYG, it is an ACF repeater field – can this not be hidden?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Jeremy Green

    (@endocreative)

    If the content is being output by ACF and not the WordPress post editor, you’ll just need to add some logic to your theme template to get the restrictions to work. Here is our documentation on using Leaky Paywall with ACF.

    https://docs.leakypaywall.com/article/46-how-to-hide-custom-fields-behind-leaky-paywall

    Thread Starter adejones

    (@adejones)

    Thanks for the quick reply, excellent bit of code, I have put that in, unfortunately it still doesn’t seem to be working for me. I have wrapped the whole page template in:

    if ( leaky_paywall_user_has_access()) {
      PAGE CONTENT HERE
    } else { }

    And the page content is still displaying when not logged in.
    Page visibility is “Only visible to digital access” and Digital Access subscription is Unlimited pages allowed, length forever.

    Am I missing something?

    Thanks.

    Thread Starter adejones

    (@adejones)

    OK, scrap that, apologies, it was the caching so I re-enabled the alternative restriction handling.
    OK so now that I have used that conditional PHP script, the page is empty, so what would I use to make the nag appear? It just doesn’t look right that the page is empty.

    Plugin Contributor Jeremy Green

    (@endocreative)

    In the “else” part of your code, you could add this to display the subscribe nag.

     $restrict = new Leaky_Paywall_Restrictions();
      echo $restrict->get_subscribe_nag();
    Thread Starter adejones

    (@adejones)

    Hi Jeremy

    Thanks for the help, I got this to work using your code and have tweaked the settings a bit. Just one more thing, I have wrapped an ACF repeater field with the code to be restricted, but the client wants just a tiny bit of the top of the table to be visible before the nag, I thought this may be what the “Lead in Elements” was for but this doesn’t seem to be having an effect, I set it to 20 and still the whole table is hidden.

    Is there a way I can just reveal the top 1 or 2 rows before the nag appears?

    You can see the page here – https://tinyurl.com/76h6neh8

    Plugin Contributor Jeremy Green

    (@endocreative)

    Yes, in your restricted logic just run a loop of the repeater field that only runs 1 or 2 times.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can’t get it to work?’ is closed to new replies.