good day
About Membership.
It has been quite a while since I purchased the plugin, but I cannot set it up properly.
Pages that are set to private on a particular plan (e.g. Plan A) are also set to private on other plans (e.g. Plan B and Plan C).
As shown in the attached image, you can add a private page only for (for example, Plan A) and then add a private page for (for example, Plan B or Plan C).
(I have not added any pages to be made private in Plan B or Plan C.
In the hivepress→memberships settings, the
Single Pages
Attribute
All Pages
I have tried everything and nothing has changed.
Also, the same page is private with no login and a specific plan (e.g. Plan A) tied to it.
The same page becomes private when the user is not logged in.
The same page will be made private for a specific plan (e.g. Plan A).
I would like to know how to make a page private for other plans.
Also, I would like to add the following code, where is your_membership_plan_plan_id?
Thank you in advance.
add_filter(
'hivepress/v1/templates/site_header_block',
function( $template ) {
if(is_user_logged_in()){
if(hivepress()->get_version('memberships')){
$membership = \HivePress\Models\Membership::query()->filter(['user' => get_current_user_id()])->get_first();
if(! $membership || your_membership_plan_id === $membership->get_plan__id()){
$template = hivepress()->helper->merge_trees(
$template,.
[
'blocks' => [
'listing_submit_link' => [
'type' => 'content',.
],
],.
]
);
}
}
}else{
$template = hivepress()->helper->merge_trees(
$template,.
[
'blocks' => [
'listing_submit_link' => [
'type' => 'content',.
],
],.
]
);
}
return $template; }
},
1000
);