Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hiding / Removing sidebar from registartion page

  • @binutz

    Participant

    Is there any way to hide sidebar from the “register”page?
    I tried editing style.css and register.php in my child theme but failed to see any result.

    I added following script in my style.css -“body.registration #sidebar { display: none; }
    body.registration div#content div.padder { margin-right: 0px; border-right: none; }-
    I am using WP.version -3.4 and Buddypress 1.6.
    Please help.

Viewing 19 replies - 1 through 19 (of 19 total)
  • @mercime

    Participant

    I tried editing style.css and register.php in my child theme but failed to see any result.


    @binutz
    what theme are you using?

    @binutz

    Participant

    Thanks for the quick reply.
    I am using BP-Default- with a child theme

    @binutz

    Participant

    In fact, I tried the steps mentioned by you in one of the old threads ( https://buddypress.org/support/topic/how-to-remove-the-sidebar-from-registration-page/) . Style.css modification with code specified removes the side bar in Google chrome browser ,leaving a small faint vertical line of about 1 centimeter length. However,in Mozilla firefox not change appears.
    When I checked the element in Chrome with a selector, it shows ” div.padder 224 x 38 px ”

    I tried editing register.php in my child-theme-folder/registration/register.php by replacing div class=”padder” with div class=”padderwide” as you had specified in the post. But it distorts the page alignment. Moreover,I was not able to find out the line ” [?php locate_template( array( ‘sidebar.php’ ), true ) ?] ” in register.php

    Hope this information is sufficient..

    @chouf1

    Participant

    @binutz,

    no need to modify your css.

    in /child-hteme/registration/register.php

    simply comment the line:218 (1.6.5) at the end of the file // get_sidebar( ‘buddypress’ );

    If needed you can do the same thing in activate.php, in the same folder.

    @binutz

    Participant

    @Chouf1
    Thanks for your response.
    I just tried that too.but ,Side bar still shows up.

    @chouf1

    Participant

    is your child theme activated ?

    have refreshed your browser  (F5) ?

    @binutz

    Participant

    Thanks for the feedback.

    My child theme is active. I have refreshed the browsers(Chrome & Firefox). sidebar is still appearing.

    My current style sheet entry (child theme) is as follows:-
    /*
    Theme Name: bpchild
    Theme URI: http://example.org/themes/bpchild/
    Description: Dark theme for BuddyPress.
    Version: 1.6
    Author: Binu
    Author URI: http://example.org/
    Template: bp-default
    Tags: buddypress, two-column, grey, dark
    */
    /* Inherit the default theme styles */
    @import url(

    ../../plugins/buddypress/bp-themes/bp-default/_inc/css/default.css );
    /* Inherit the default theme adminbar styles */
    @import url(

    ../../plugins/buddypress/bp-themes/bp-default/_inc/css/adminbar.css );

    @import
    url( ../../plugins/buddypress/bp-themes/bp-default

    ——

    I have edited register.php in child theme as follows:

    I hope I have done it correctly…

    Is there any plugin available to remove sidebar from registration page?
    Can this be done with css modification in any other file?

    @binutz

    Participant

    I have edited register.php in child theme as follows inside opening and closing php tags :-

    // get_sidebar( ‘buddypress’ );

    I hope I have done it correctly…

    @bphelp

    Participant

    All you gotta do is comment out the code on line 278. Here is an example:
    http://pastebin.com/8kyhDvgp

    @binutz

    Participant

    @bphelp
    Thanks for the advice.
    I tried what you had suggested. It did not remove sidebar .
    It leaves the following symbol at the bottom of the page on the left hand side.
    /* */
    Is there anyway to get rid of sidebar by css modification?
    Is it possible to use html code to hide side bar?

    @hnla

    Participant

    No you should not use CSS to achieve this. If you have stray comment characters then you haven’t removed things correctly and have left those characters in the markup to be parsed. Re-visit the code remove those.

    This doesn’t sound like a standard BP file? is it modified? copy the code in the file to pastebin so people can see what you are modifying.

    @binutz

    Participant

    @Hugo

    Thanks for your comment. In fact, you guessed it right! I had slightly modified the register.php file by inserting some html tags. I deleted register.php from registration folder in my child theme and replaced it with a fresh “register.php” copied from registration folder/ BP Default theme folder. subsequently,I edited the code on line 278. This time side bar column appeared “empty” leaving a faint vertical line(top to bottom) that separates registration form and the sidebar.

    Whenever I add the script “body.registration #sidebar { display: none; }
    body.registration div#content div.padder { margin-right: 0px; border-right: none; } in my style .css in my child theme folder , registration page appears full width by covering the empty space left by the side bar.However it shows up only Google Chrome..in Mozilla Firefox “empty sidebar” remains.
    I have copied the code of my register.php to pastebin for your reference.
    http://pastebin.com/yDk7N0v2

    All I want to do is to make registration page and members page full width. Hope help is at hand.

    @mercime

    Participant

    @binutz replace `<div class=”padder”>` with `<div class=”pad-registration”>` in your register.php

    Then in your child theme’s stylesheet add:
    `div.pad-registration { padding: 19px; }`

    @binutz

    Participant

    @mercime,@Hugo,@bphelp,&@chouf1,

    Thanks to you all for the help.
    The code which you had posted removed the side bar perfectly.!
    But a new issue has cropped up now!

    The left,Top and bottom margins of the registration form have been disappeared now. And therefore,the text in the left hand side of the form (Create an Account & Account details) starts from the border of the registration form.
    Similarly, “complete sign up” button is touching the border of the form at the bottom.

    Right hand side of the form looks normal.

    Any quick fix solution is available to rectify this?

    @mercime

    Participant

    @binutz can’t imagine what went awry. site url?

    @binutz

    Participant

    I figured it out now !
    The 19px Padding that surrounds the registration form is not showing up! which means 19px boarder around the text content of the registration form, in the registration page is missing.

    I found it out by inspecting the elements using firebug.
    Looks like the code that i have added in register.php is causing some interference.

    Hope it is a minor problem.

    @binutz

    Participant

    @mercime,@Hugo,@bphelp,&@chouf1,

    I was able to achieve the desired result by slightly modifying the code suggested by Mercime.
    here is what UI have done .
    Instead of “pad-registration” I added =”padder one-column” in my register.php

    In my style .css ,I added div.padder one-column { padding: 19px; }

    All modifications have been done only in my child theme folder only.

    Is this method advisable?

    Instead of commenting the line:218 (1.6.5) at the end of the file // get_sidebar( ‘buddypress’ ); in child-theme/registration/register.php, Can I remove the same? Will it cause any issue?

    @mercime

    Participant

    @binutz sure, modifications should be done in child theme. And yes, you can just delete get_sidebar from the register.php file. No problem.

    @binutz

    Participant

    @mercime,
    Thank you for clarifying.It was a great help from your end.

Viewing 19 replies - 1 through 19 (of 19 total)
  • The topic ‘Hiding / Removing sidebar from registartion page’ is closed to new replies.
Skip to toolbar