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.

The php code for [s2member profile\]

Home Forums Community Forum The php code for [s2member profile\]

This topic contains 3 replies, has 2 voices. Last updated by  Raam Dev 4 years, 6 months ago.

Topic Author Topic
Posted: Monday Jul 9th, 2012 at 7:08 pm #18718

Hi Guys,

Can you please let me know the php code to call up the currently logged in user’s profile ?

For some reason shortcodes do not work with my theme.

Thanks!

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Tuesday Jul 10th, 2012 at 2:24 am #18774
Raam Dev
Username: Raam
Staff Member

Hi,

You can do this:

<?php echo do_shortcode("[s2Member-Profile /]"); ?>

Also, you may want to look at Dashboard -› s2Member® -› API / Scripting -› Member Profile Modifications.

Posted: Tuesday Jul 10th, 2012 at 7:25 am #18801

Thanks Raam,

Just curious, for themes that do not support your shortcodes, if you could give me the code to add to my themes functions.php, I could add it and test if the shortcodes work.

Is there a function to add to functions.php to get the user profile shortcode to work?

Posted: Wednesday Jul 11th, 2012 at 2:15 am #18873
Raam Dev
Username: Raam
Staff Member

The s2Member plugin adds support for the shortcodes in WordPress when you install and activate the plugin. You don’t need to add support for them to your theme.

If you need to use PHP to call a shortcode, you can do so with the following:

<?php echo do_shortcode("[shortcode-here]"); ?>

If you want to use PHP within your WordPress Posts/Pages, you can use a plugin such as Exec-PHP.

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.