-
Author
-
July 27, 2017 at 16:20 #168744clynParticipant
Hi,
I purchased buddyapp theme yesterday and installed all demo data. All is ok. I did make my site private. But, i want to make public my custom post types and standart wp-post? How can i do this?
Thanks…
July 28, 2017 at 06:19 #168806LauraModeratorHello, 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 🙂
July 31, 2017 at 15:34 #169111RaduModeratorHi,
Just use the next snippet
COPY CODEfunction sq7_rdu_restrict_but_exception_cpt() { /*check if is blog page choosen on wp-admin -> settings-> reading -> posts page.*/ if( is_singular( 'post' ) || is_singular('you-custom-cpt-name') ) { remove_action('template_redirect', 'kleo_restrict_site'); } } add_action('wp','sq7_rdu_restrict_but_exception_cpt');
Just replace the: you-custom-cpt-name with your CPT slug
That’s all
Let me know
The function needs to be pasted in wp-content/themes/buddyapp-child/functions.php
NOTE : Child theme needs to be installed and activated.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionAugust 1, 2017 at 18:17 #169276clynParticipantthanks Radu,
Acually i would like to use Paid membership Pro pluging to restrict some pages or post but some problems.1 – Paid membership pro is not rectrict buddypress section such as abcdomain . com/groups or members or activiy. Any code for this?
2 – Above problem, i decide to solve with Buddypress Members Only pluging. Yes this is restrict buddypress defaul page but this time also rectrict Post and CPT 🙂
3 – How can i give a role for new membership levels? Any free add on for paid memership pro for user roles?
4 – My project accept only invited with cost. So i am using invite code. But if i give a membership level cost is 0, anyano can to membership levels and can be member. How can i solve this… ThanksAugust 1, 2017 at 18:26 #169277clynParticipanti think number 3 is solved with this paid membership pro add on
August 1, 2017 at 18:59 #169282clynParticipantI think I solve no4 with this code
add_action(‘user_register’, ‘kleo_pmpro_default_level’);
function kleo_pmpro_default_level($user_id) {
pmpro_changeMembershipLevel(1,$user_id);
}new register using default register form with own invite code. After complite register and activate account than login site with new membership levels and role… Is this OK?
NO1 AND NO2 IS WAITING 🙂
August 1, 2017 at 21:47 #169304clynParticipantRadu,
I solve all my problems except this code, ok i am writing (‘post‘) yes post page is open. But can you expand this code such as i am using book,cinema etc Custom Post Type..thanks
function sq7_rdu_restrict_but_exception_cpt() {
/*check if is blog page choosen on wp-admin -> settings-> reading -> posts page.*/
if( is_singular( ‘post’ ) || is_singular(‘you-custom-cpt-name‘) ) {
remove_action(‘template_redirect’, ‘kleo_restrict_site’);
}
}add_action(‘wp’,’sq7_rdu_restrict_but_exception_cpt’);
August 1, 2017 at 22:45 #169309clynParticipantI think i solved 🙂 if you say everything is ok, i will use below code…Thanks
function sq7_rdu_restrict_but_exception_cpt() {
/*check if is blog page choosen on wp-admin -> settings-> reading -> posts page.*/
if( is_singular( ‘post’ ) || is_singular(‘post‘) || is_singular(‘book‘) || is_singular(‘cinema‘)) {
remove_action(‘template_redirect’, ‘kleo_restrict_site’);
}
}add_action(‘wp’,’sq7_rdu_restrict_but_exception_cpt’);
August 2, 2017 at 19:40 #169405RaduModeratorGreat
Yes that’s it
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionAugust 3, 2017 at 16:10 #169453RaduModeratorNo problem
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 ‘General questions’ is closed to new topics and replies.