This topic has 4 replies, 2 voices, and was last updated 10 years by 4bservices.
-
Author
-
July 13, 2014 at 21:36 #224694bservicesParticipant
I have looked at this thread: https://archived.seventhqueen.com/forums/topic/extra-membership-restrictions-how-to I am still confused.
I’d like to add a couple of fields that on one it’s grayed out showing it’s not included and on the other it’s highlighted just like the rest showing it’s included.
Exclusive Forums
Member Search
Special Prizes and ContestsWhere do I add the code?
July 16, 2014 at 15:38 #22745CatalinModeratorHello,
Please take a look at this link:
https://archived.seventhqueen.com/forums/topic/membership-levels-price-page
Thank you,
CatalinHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJuly 19, 2014 at 00:58 #229774bservicesParticipantOkay I got the other fields to show but I can not get the “free” account to go gray.
http://jeepedin.com/membership-account/membership-levels/
http://jeepedin.com/beta (bypass coming soon page)
Here is the code
The membership id for the free level is 2 and the paid is 1 I want the extra fields to show for 2 but want them to be dark for 1
// restrict profile area – Messages page
add_action(‘kleo_pmro_extra_restriction_before_my_profile’,’kleo_my_custom_restrict1′);function kleo_my_custom_restrict1()
{
//full current url
$actual_link = kleo_full_url();
//our request uri
$uri = str_replace(untrailingslashit(home_url()),””,$actual_link);//restrict messaging page url
if(preg_match(“/^\/”.bp_get_members_root_slug().”\/”. bp_get_loggedin_user_username().”\/messages\/?/”, $uri))
{$my_restrictions = array(‘message’ => array(
//2 – restrict certain levels. 0 -restrict none; 1 – restrict all
‘type’ => 2,
//levels that you apply the restrictions to
‘levels’ => array(2,-1),
//’not_member’ => 1, //restrict users without a membership level
//’guest’ => 1 // restrict not logged in users
)
);
//We use the name “message” from the new restriction added above
kleo_check_access(‘message’,$my_restrictions);
}
}//Restrict Shop page
add_filter(‘kleo_pmpro_match_rules’, ‘kleo_my_custom_restrict2’);function kleo_my_custom_restrict2($restrictions) {
//regular expression for shop page
$restrictions[“/^\/shop\/?$/”] = array(‘name’ => ‘shop’);
return $restrictions;
}I don’t need to actually restrict pages I did that else where so di I need to remove some of this code??? But how do I get it to recognize it on the pricing table???
July 19, 2014 at 01:05 #229784bservicesParticipantOkay I see I need to go into the Sweetdate settings to make it happen.
Whew – I’ve been at this too long and making this harder then it needs to be! Sorry to be a bug.
-
AuthorPosts
The topic ‘Add fields to Membership Pricing Table’ is closed to new replies.