This topic has 10 replies, 3 voices, and was last updated 6 years by Radu.

  • Author
  • #168744
     clyn
    Participant

    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…

    #168806
     Laura
    Moderator

    Hello, 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 solution

    Laura 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 🙂

    #169111
     Radu
    Moderator

    Hi,

    Just use the next snippet

    COPY CODE
    
    
    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');
    

    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 solution
    #169276
     clyn
    Participant

    thanks 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… Thanks

    #169277
     clyn
    Participant

    i think number 3 is solved with this paid membership pro add on

    #169282
     clyn
    Participant

    I 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 🙂

    #169304
     clyn
    Participant

    Radu,

    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’);

    #169309
     clyn
    Participant

    I 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’);

    #169405
     Radu
    Moderator

    Great

    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 solution
    #169426
     clyn
    Participant

    🙂 thanks your confirmation …

    #169453
     Radu
    Moderator

    No 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
Viewing 11 posts - 1 through 11 (of 11 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?