-
Author
-
February 25, 2017 at 01:29 #154152
kvento
ParticipantI’m trying to lock down listings pages (they are being populated from geodirectories) based on membership level. I put the proper shortcode in the listings widget along with the functions.php code and nothing is working. There is no actual “page” to click the membership level access, the content is all being pulled from CPTs.
want to lock these pages to membership levels:
http://showoffmydog.com/breeders/
http://showoffmydog.com/stud_dogs/THANK YOU!
February 27, 2017 at 04:04 #154234Laura
ModeratorHello, will assign the ticket to a higher support level who can help and advise you in your query.
Thanks! ?Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
February 28, 2017 at 16:04 #154364Radu
ModeratorHi,
You can restrict portions of content using shortcodes see on the next page at the bottom : https://archived.seventhqueen.com/kleo/article/restrict-content-for-certain-membership-level
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 28, 2017 at 16:19 #154365kvento
ParticipantRight – it’s not working… I put in the do shortcodes in functions too.
February 28, 2017 at 18:47 #154394Radu
ModeratorHi,
Please confirm to me if you area able to restrict a certain page but not a page that belongs to Geo Directory.
Let me know and provide also an admin account to take a closer look but check that first
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 1, 2017 at 18:30 #154505Radu
ModeratorHi,
I’ve saw that, there it’s no quick solution for what you need but I’ve created a small function that allows you to restrict by certain post type
COPY CODEfunction my_resitrct_my_cpt() { global $pmpro_pages, $post; if( is_singular( 'gd_breeders' ) || is_singular( 'your_second_cpt' ) ) { if ( is_user_logged_in() && !pmpro_hasMembershipLevel() ) { if (isset($post->ID) && !in_array($post->ID, $pmpro_pages)) { wp_redirect( pmpro_url() ); } } } } add_action('template_redirect', 'my_resitrct_my_cpt');
This it’s something custom if you need more assistance for your project I recommend you to hire a developer
The function needs to be pasted in wp-content/themes/kleo-child/functions.php
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 1, 2017 at 18:30 #154506Radu
ModeratorHi,
I’ve saw that, there it’s no quick solution for what you need but I’ve created a small function that allows you to restrict by certain post type
COPY CODEfunction my_resitrct_my_cpt() { global $pmpro_pages, $post; if( is_singular( 'gd_breeders' ) || is_singular( 'your_second_cpt' ) ) { if ( is_user_logged_in() && !pmpro_hasMembershipLevel() ) { if (isset($post->ID) && !in_array($post->ID, $pmpro_pages)) { wp_redirect( pmpro_url() ); } } } } add_action('template_redirect', 'my_resitrct_my_cpt');
This it’s something custom if you need more assistance for your project I recommend you to hire a developer
The function needs to be pasted in wp-content/themes/kleo-child/functions.php
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 3, 2017 at 00:51 #154646kvento
ParticipantThank you, I’ve added it to the child’s function.php but it is not restricting those CPT pages. What am I doing wrong? Do I need to change anything besides ‘your_second_cpt’
Thank you!
March 3, 2017 at 00:56 #154647kvento
ParticipantI just tried to lockdown http://showoffmydog.com/register/ page (regular page) and it’s not working either. I was able to lockdown memberships the other day, but now I can’t do this regular page with the normal page check.
March 3, 2017 at 16:50 #154679Radu
ModeratorHi again
I see it seems you need continue custom support and we cannot offer that… we can support oly theme problems and questions you have here custom development needs and i recommend you to hire a developer to implement and to adapt the restrictions as you need.
I’ve tried to provide you some functions to acheive that but it seems that not are sufficient.Have a nice week-end
https://wpgeodirectory.com/support/topic/add-listing-page-restriction/
https://wpgeodirectory.com/support/topic/paid-membership-pro-page-restriction/Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 3, 2017 at 17:10 #154688kvento
ParticipantI should be able to lock down a regular page like /register should I not? Please advise.
March 6, 2017 at 16:36 #154897Radu
ModeratorA regular page yes but the register page it’s part of buddypress used for user registering and if you will restrict that a guest user cannot reach that page and it cannot create account.
And if the page it’s assigned as register page in buddypress settings, it’s possible to not works but for the rest of the pages yes.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘Plugins questions’ is closed to new topics and replies.