Shortcodes on custom page templates

Hi there!
I'm building a site for an online magazine, where you pay for each issue individually.

I have a membership level for each issue:

[level-visitor] for non-subscribers
[level-reader-issue-1] for people who buy issue 1
etc.

Issue 1 has it's own custom page template (issue1.php) as it's easier to write.

I want the first article of issue 1 to be visible to [level-visitor] who are then prompted to buy the whole thing. I have tried <!--more--> tags but WP won't let me use them on custom page templates.

So I am trying to use the shortcodes, to protect the content.

I want to wrap the magazine inside a shortcode [level-reader-issue-1] so it will only be visible to that level.

In my php template I have tried:

<?php echo do_shortcode("[level-reader-issue-1]"); ?>

then at the end:

<?php echo do_shortcode("[/level-reader-issue-1]"); ?>

This displays the "buy now" message (so it has been triggered), but it does not protect the content.

So in summary: how do you use shortcodes to protect content when the content is in a custom-page template?

Any help much appreciated!

Adam

  • MScott821

    That makes me think of a question regarding the "drip"/movement through the levels when using MEmbership...

    Adam wants to make each issue a level. Ok. Sound good.

    However, how does it work when the next month, they gain access to Issue 2: Does he make the user subscription a "serial" and at the end of each 30 days, they move to the next level?

    And that leads to the real question: When you have a serial subscription that moves to a different level after X number of days - when I am billed and gain access to level/issue 2, am I still a member of level 1? Or am I now only a member of level 2 and removed from 1?

    Asked another way, when levels are used in a serial subscription to drip - are you added to new levels or are you moved to them and deleted from the prior?

    This has HUGE impact on how you think through providing access to both previous and new content...

    ON ANOTHER NOTE - I think Adam may also have a BIG challenge - unless I am being obtuse, and I may be - what if I don't subscribe until issue #4? I shouldn't gain access to issues 1 -3, at least not in a "normal" magazine subscription...

    So how do you manage that? Using the same subscription would always start them off at level/issue 1. Creating a new subscription for each new issue seems like that would become insane to manage... Am I missing something?

  • aecnu

    Greetings MScott821 and Happy New Year!

    Thank you for the GREAT questions!

    However, how does it work when the next month, they gain access to Issue 2: Does he make the user subscription a "serial" and at the end of each 30 days, they move to the next level?

    This would indeed need to be the way that it works with only one subscription where they start at the base level and move through the levels.

    When you have a serial subscription that moves to a different level after X number of days - when I am billed and gain access to level/issue 2, am I still a member of level 1? Or am I now only a member of level 2 and removed from 1?

    No the first level will end at the end of the serial and they would be forced to the next level and no longer a member of the first level etc.

    Asked another way, when levels are used in a serial subscription to drip - are you added to new levels or are you moved to them and deleted from the prior?

    Yes because one cannot be a member of more then one level though they would indeed need to subscribe to the next level.

    I think Adam may also have a BIG challenge - unless I am being obtuse, and I may be - what if I don't subscribe until issue #4? I shouldn't gain access to issues 1 -3, at least not in a "normal" magazine subscription...

    This is indeed the big challenge because as it stands they would all start at level one.

    Thank you both for being WPMU DEV Community Members and Happy New Year!

    Cheers, Joe

  • AdamWestbrook

    Hi guys,

    Thanks for the help! I've only recently downloaded membership and have been testing it out.

    Ideally I want to sell individual issues, and offer the chance to buy all four for a discount, rather than subscriptions. The magazine is web based, rather than having access to a pdf to download, so it is effectively a one-off paywall.

    If what you say is correct, Membership might not be the best solution.
    That said, I might see if I can rethink my sales strategy, but I'm not sure my readers would be comfortable signing up for an ongoing membership to a quarterly magazine - especially without trialling an issue.

    Thanks again!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.