Content dripping not working because ">" is not working

12 replies
Hello everyone.

I'm currently making a membership site with S2member, and I'm planning to drip the content. The code that S2Member gives =

<?php if(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 2){ ?>
drip drip drip
<?php } ?>

This means that people who are registered 2 or more days get to see the content. The problem is, when I publish, I see this:

= 2){

The problem is the Greater-Than sign, because when I use this:

<?php if(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS = 2){ ?>
drip drip drip
<?php } ?>

Then it's working fine.

How come Wordpress can't handle the ">" sign?

Thanks.
#&gt #> #content #dripping #working
  • Profile picture of the author SteveSRS
    you do understand this is PHP code right?

    Entering this in a wordpress content box is not going to do a lot (unless you have some execute php plugin installed with exactly those tags to activate, which as far as I know doesn't exists I do know one with though)

    The code you show is 'source code' and is meant to be put in source code files (.php files).

    Hope that helps a bit.
    {{ DiscussionBoard.errors[7797946].message }}
    • Profile picture of the author Jeremy Lacer
      Originally Posted by SteveSRS View Post

      you do understand this is PHP code right?

      Entering this in a wordpress content box is not going to do a lot (unless you have some execute php plugin installed with exactly those tags to activate, which as far as I know doesn't exists I do know one with though)

      The code you show is 'source code' and is meant to be put in source code files (.php files).

      Hope that helps a bit.
      Yes I understand it. I installed a plugin for it.
      The problem is the ">" sign. If I only use the "=" sign it's working great.

      What could be the problem?

      Thanks
      {{ DiscussionBoard.errors[7797975].message }}
  • Profile picture of the author Andrew H
    I would assume this is a problem with the plugin assuming that > is the end of the <?php tag. Post the problem to the plugin's support.
    Signature
    "You shouldn't come here and set yourself up as the resident wizard of oz."
    {{ DiscussionBoard.errors[7798007].message }}
    • Profile picture of the author Jeremy Lacer
      Originally Posted by Andrew H View Post

      I would assume this is a problem with the plugin assuming that > is the end of the <?php tag. Post the problem to the plugin's support.
      That might be it.. The forum of S2Member is paid so I can't ask it there since I'm not a paid member :rolleyes:.
      {{ DiscussionBoard.errors[7798015].message }}
  • Profile picture of the author Andrew H
    The problem is with the plugin that allows you to enter PHP code into the content area - is that also made by S2Member?
    Signature
    "You shouldn't come here and set yourself up as the resident wizard of oz."
    {{ DiscussionBoard.errors[7798055].message }}
    • Profile picture of the author Jeremy Lacer
      Originally Posted by Andrew H View Post

      The problem is with the plugin that allows you to enter PHP code into the content area - is that also made by S2Member?
      Noo it's not the PHP plgin because I tested more. The anwers on the forum aren't working for me.
      {{ DiscussionBoard.errors[7798241].message }}
  • Profile picture of the author Andrew H
    Check a couple posts down on this page:
    s2Member® | Topic: Drip Content Solution
    Signature
    "You shouldn't come here and set yourself up as the resident wizard of oz."
    {{ DiscussionBoard.errors[7798072].message }}
  • Profile picture of the author Andrew H
    So does this work:

    <?php if(2 > 1) { echo 'greater than sign works'; } ?>

    If its not a problem with the > being interpreted as ending the <?PHP tag you will not see the text:

    greater than sign works
    Signature
    "You shouldn't come here and set yourself up as the resident wizard of oz."
    {{ DiscussionBoard.errors[7798404].message }}
  • Profile picture of the author Jeremy Lacer
    Again, only this shows:

    1) { echo ‘greater than sign works’; } ?>

    So the > sends the PHP indeed. Really strange...
    {{ DiscussionBoard.errors[7798517].message }}
  • Profile picture of the author Andrew H
    So what PHP plugin are you using for wordpress? Start looking into that to get the solution.
    Signature
    "You shouldn't come here and set yourself up as the resident wizard of oz."
    {{ DiscussionBoard.errors[7798795].message }}
  • Profile picture of the author Tradeout
    I've no idea what your plugin is doing, but the following could provide you a quick fix:

    switch(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAY S)
    {

    case 0:

    break;

    case 1:

    break;

    default:
    // drip drip drip


    }

    What's it doing?
    Nothing on zero or day 1 as case is matched and the code is stopped.

    There is no case for any other day so it uses the default case.
    {{ DiscussionBoard.errors[7819640].message }}
    • Profile picture of the author tangopoint
      Maybe I am missing something, but shouldn't the "S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS" be a variable.

      Try "if($S2MEMBER_CURRENT_USER_PAID_REGISTRATION_D AYS >= 2)"

      The S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS is also likely stored as a string not a number so try putting the 2 in quotes.

      if($S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= '2')
      {{ DiscussionBoard.errors[7825632].message }}

Trending Topics