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.

Show specific page related to custom field

Home Forums Community Forum Show specific page related to custom field

This topic contains 2 replies, has 2 voices. Last updated by  Bruce 3 years, 11 months ago.

Topic Author Topic
Posted: Wednesday Feb 6th, 2013 at 1:04 pm #40917

I’m using WordPress.org and BuddyPress with S2member. I have a custom field relating to a business industry. For one industry I am offering different discounts on a product. Right now I am using this [s2If current_user_is(s2member_level4)] for different levels to show information related to each level. But I want to add a layer in for the industry.

Is there something similar I can do to only show the “real estate industry” custom field their price and “add to cart” button only?

List Of Topic Replies

Viewing 2 replies - 1 through 2 (of 2 total)
Author Replies
Author Replies
Posted: Thursday Feb 7th, 2013 at 7:24 am #41022

BUMP (I thought part of paying for the product was getting support in a timely manner…?). I’m hoping someone is paying attention.

Posted: Thursday Feb 7th, 2013 at 9:14 pm #41147
Bruce
Username: Bruce
Staff Member

Thank you for your inquiry.

Is there something similar I can do to only show the “real estate industry” custom field their price and “add to cart” button only?

s2Member’s Shortcode Conditionals currently cannot support this, but s2Member’s Advanced PHP Condtionals can.

See: Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Conditionals

To use s2Member’s Advanced PHP Condtionals in a Post/Page, you must have a PHP Execution Plugin installed.
See: ezPHP Plugin for WordPress®

Something like this would work, if your Custom Registration/Profile Field’s ID/slug were typeof:

<?php
$field = get_user_field('typeof');
if($field === 'the necessary value') { ?>
This is where your Shortcode would go.
<?php } ?>
The get_user_field() is an s2Member-created function.
Find documentation on the get_user_field() function in /s2member/includes/functions/api-functions.inc.php

Let us know if you have any further questions/concerns. :-)

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.