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.

How to load S2 codes in a additional header?

Home Forums Community Forum How to load S2 codes in a additional header?

This topic contains 2 replies, has 2 voices. Last updated by  Ivan 4 years, 5 months ago.

Topic Author Topic
Posted: Sunday Jul 22nd, 2012 at 12:09 pm #19942
Ivan
Username: Ivan Fraer

Hello

I´m using a WP theme called “Modular” (http://www.mysitemyway.com) and here I can enter some HTML in top of the page (additional headers).

<table bgcolor="#05141F" border="0" width="100%"><tr>
<td>ANY TEXT OR HTML CODE HERE</td>
</tr></table>

But I can´t use a S2 code like this:

<?php if (S2MEMBER_CURRENT_USER_ACCESS_LEVEL === 4){ ?>
MY "SECRET" TEXT HERE...
<?php } ?>

Does anyone know how to get this to work?
I gues I need to call some WP functions first, or???

Thank you in advance.

Best regards
Ivan Fræer
http://www.gpsforalle.dk

List Of Topic Replies

Viewing 2 replies - 1 through 2 (of 2 total)
Author Replies
Author Replies
Posted: Monday Jul 23rd, 2012 at 5:28 am #19970
Raam Dev
Username: Raam
Staff Member

Hi Ivan,

s2Member loads when the WordPress framework loads. It sounds like the theme you’re using allows you to edit HTML files that are then put together before WordPress is even called, so you wouldn’t be able to use s2Member functions or constants inside those files.

This sounds like a limitation of the theme itself, but I recommend contacting the theme developer and asking them how you can use PHP to call WordPress plugins from within your template files.

Posted: Monday Jul 23rd, 2012 at 5:31 am #19972
Ivan
Username: Ivan Fraer

Thank you very much and I will contact the theme developer.

Best regards
Ivan

Viewing 2 replies - 1 through 2 (of 2 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.