Having trouble writing simple shortcode conditional for user id

I have 2 access levels, 0 and 1. I want to write a simple short code conditional for paypal buttons based on user id for 2 members specifically

Here is what I have tried:

[s2If current_user_is(user_id_16,17)] paypal button [/s2If]

didn’t work, so I tried:

[s2If current_user_is(user_id=“16,17”)] paypal button [/s2If]

didn;t work either. I have also tried each with only 1 user id number and that didnt work either. What am I doing wrong? Thank you in advance.

Hi,
In fact, you’re using a bad conditional logic, you should not put the condition on IDs but rather on custom capabilities that you link to IDs (members).
I therefore advise you to assign a different custom capability to each group of members (ID groups) that you want to differentiate.
Thanks.

Ok, I think I follow that, except I am not sure how to write it.

I want to place a paypal button with a yrly subscription for 2 individuals by ID #, but, I want to give them access to the same level one content as a regular level 1 member, on the same page as the other paypal buttons. But, I don’t want anyone but them to see it. Which is why I would use the simple shortcode conditional by user id. I had already created the paypal button and it works. I don’t know how to write the conditional for a user id.

I am not giving them access to something different on the site, I am just giving them a different payment plan. So then, I don’t know how to write the custom capability for this.

I want them in the system so I don’t have to guess from year to year what or when or how they are covering their membership.

Thank you in advance for your help.

If this two people in question are already registered on your site, you must manually add a custom capability to these two members…
To do this, add a custom keyword of your choice for these two members in the “Custom Capabilities” column of the “Users” section of your Wordpress Administration Panel.
Then use the following conditional shortcode to make them show your PayPal button:
[s2If current_user_can (access_s2member_ccapkeyword)] Paypal button [/ _s2If]
Thanks.

Maybe you can find a good constant, like ID or username by [s2Get constant="…" /] and then can use this hack.

Just say this, my apologies for missing it. I decided to go a different route, but, thank you, because my next problem has been how to effectively write the test for access and ccaps. Almost have that question answered. So, let’s leave the paypal button and user id issue for a minute.

If I were doing this for a menu visibility test. If the ccap is tied to level 1, I don’t have to call it out in the test?

And then would it be: current_user_can (access_s2member_ccap_keyword)

Thank you in advance!

Hi,
If you have this ccap only when you’re level 1 in your payment shortcode configuration, you don’t have to call it out a new time.
Thanks.