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

  • Author
  • #197382
     TheDream18
    Participant

    Hi,

     

    I create register page for buddypress , i already tested with each of solution bellow (tested one by one):

    + Choose template: Page full width, no sidebar

    + Choose template: full with for builder

    + Use css hidden sibar on register page-id-908 ==> sidebar hidden success, but leaved empty sidebar , register in the left , not in center when i already hidden sidebar

     

    So what is the right solution?

    Thanks

    #197434
     Radu
    Moderator

    Try with this php code

    COPY CODE
    
    
    function change_layout_on_register_page() {
        if (is_page('register')){
            kleo_switch_layout('right');
        }
    }
    add_action('init', 'change_layout_on_register_page');
    

    Add it to child theme 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 solution
    #197460
     TheDream18
    Participant

    Code no work. “register” i tested both page name and slug name.
    my currect register page id 967, templete full width, no sidebar

    #197721
     Radu
    Moderator

    Hi,

    Check this one instead

    COPY CODE
    
    function change_layout_on_register_page() {
        if (is_page('1222')){
            kleo_switch_layout('full');
        }
    }
    add_action('init', 'change_layout_on_register_page');
    //add_action('after_setup_theme', 'change_layout_on_register_page');
    //add_action('wp', 'change_layout_on_register_page');
    

    Replace the 1222 with your page id ,if still not take any effect uncomment the lines with // one by one by testing any of the action hooks.

    Make also sure to have child theme 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
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?