latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Blank Page with PHP Scripting

Home Forums Community Forum Blank Page with PHP Scripting

This topic contains 3 replies, has 2 voices. Last updated by  Cristián Lávaque 4 years, 3 months ago.

Topic Author Topic
Posted: Tuesday Sep 25th, 2012 at 4:56 am #26408
Aymeric B
Username: AymericB87

Hi,

I’d like to create a completly blank page that only print a key number if the user has acess 1, so I made a page called key.php that I put it in my wp-content with :

<?php if (current_user_can("access_s2member_level1")){ ?>
     <p>Key: 4GJHEZY8765KJJ</p>
<?php } else { ?>
     <!--Nothing-->
<?php } ?>

but I have a php error telling me it can’t find the current_user_can() function.
If I create a new page in my wp admin, of course it works but there is all the theme arround the key. I really want a blank page with just the key. How to do that please ?

  • This topic was modified 4 years, 3 months ago by  Aymeric B.

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Tuesday Sep 25th, 2012 at 7:51 am #26421

Hi Aymeric.

You need to include WP to your script, or [hilite mono]current_user_can[/hilite] won’t be defined to be used. http://www.primothemes.com/forums/viewtopic.php?f=4&t=3145&p=9683#p9683

I hope it helps. :)

Posted: Tuesday Sep 25th, 2012 at 8:32 am #26427
Aymeric B
Username: AymericB87

It’s perfect !! Thanks

Posted: Wednesday Sep 26th, 2012 at 7:14 am #26537

Cool. :)

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.