Login and Signup Located under main menu bar

How do I get rid of the Login and Signup fields that are in the grey bar under my main menu? I have a WishList Member Widget I want to use, ...and it just looks too cluttered to use when the Login and Signup fields are also under my main menu. I still like the "search" that is in the grey area under the menu bar.........can I put it somewhere else if we can hide or remove the Login/Signup?
Thanks

  • colinopseth
    • WPMU DEV Initiate

    Here's a tip you can use if you aren't a really good coder. Rather than delete code, comment it out by adding // in front of a line you want to delete. Keep in mind that this shortcut only works with code that is between php calls.

    Generic example:

    <?php
    //echo '<div class="header-top-area-inner layout-width">',"\n";
    //if (has_nav_menu('top menu')) {
    //ht_top_wp_nav();
    //}else{
    //ht_no_wp_nav_notice();
    //}
    //ht_top_social_media();
    //echo '</div>',"\n";
    ?>

  • eileensventures
    • Design Lord, Child of Thor

    So do I copy the Parent theme header.php into the Directory Structure of the Child theme where I have the style.css file? Then do I just modify the newly copied file on line 271 and leave the rest of the file the same.......then this child file overrides the parent file?

    Thanks for the clarification.

  • eileensventures
    • Design Lord, Child of Thor

    Okay file too big..........Should I start at line 304? Line 271 doesn't make any sense. I inserted a note to you at line 304........ See the code
    starting with line 271:
    </div>

    <?php
    if( $tn_buddycorp_header_on == 'enable') { ?>
    <?php if('' != get_header_image() ) { ?>
    <div id="custom-img-header">
    <div class="custom-img-header">"><img src="<?php header_image(); ?>" alt="<?php bloginfo('name'); ?>" /></div>
    </div>
    <?php } } ?>

    <?php do_action( 'bp_before_search_login_bar' ) ?>

    <?php if($bp_existed == 'true') { //check if bp existed ?>

    <?php if( !bp_is_register_page() ) { ?>

    <div id="searchbox">

    <form action="<?php echo bp_search_form_action() ?>" method="post" id="search-form">
    <input type="text" id="search-terms" name="search-terms" value="" />
    <?php echo bp_search_form_type_select() ?>
    <input type="submit" name="search-submit" id="search-submit" value="<?php _e( 'Search', TEMPLATE_DOMAIN ) ?>" />
    <?php wp_nonce_field( 'bp_search_form' ) ?>
    </form>
    <?php do_action( 'bp_search_login_bar' ) ?>

    [Phil this is Line # 304 - is this where I start the changes?] <div id="fc_wrap">
    <?php if ( !is_user_logged_in() ) : ?>

    <?php $check_active_signup = get_site_option( 'registration' ); if( $check_active_signup == 'none' ) { //if signup not allowed ?>
    <?php } else { ?>

    <?php do_action( 'bp_before_sidebar_login_form' ) ?>

    <form name="login-form" id="login-form" action="<?php echo site_url( 'wp-login.php' ) ?>" method="post">
    <input type="text" name="log" id="user_login" value="<?php _e( 'Username', TEMPLATE_DOMAIN) ?>" onfocus="if (this.value == '<?php _e( 'Username', TEMPLATE_DOMAIN) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Username', TEMPLATE_DOMAIN) ?>';}" />
    <input type="password" name="pwd" id="user_pass" class="input" value="" />
    <input type="checkbox" name="rememberme" id="rememberme" value="forever" title="<?php _e( 'Remember Me', TEMPLATE_DOMAIN ) ?>" />
    <input type="submit" name="wp-submit" id="wp-submit" value="<?php _e( 'Log In', TEMPLATE_DOMAIN) ?>"/>
    <?php if ( bp_get_signup_allowed() ) : ?>
    <input type="button" name="signup-submit" id="signup-submit" value="<?php _e( 'Sign Up', TEMPLATE_DOMAIN) ?>" onclick="location.href='<?php echo bp_signup_page() ?>'" />
    <?php endif; ?>
    <input type="hidden" name="testcookie" value="1" />
    <?php do_action( 'bp_login_bar_logged_out' ) ?>
    </form>

    <?php do_action( 'bp_after_sidebar_login_form' ) ?>

    <?php } ?>

    <?php else : ?>

    <div id="logout-link">
    <?php bp_loggedin_user_avatar( 'width=20&height=20' ) ?>   <?php bp_loggedinuser_link() ?> / <?php bp_log_out_link() ?>
    <?php do_action( 'bp_login_bar_logged_in' ) ?>
    </div>

    <?php endif; ?>

    </div>
    </div>
    <?php } //dont show in reg page ?>

    <?php } else { ?>

    <div id="searchbox">
    <?php locate_template( array( 'lib/templates/wp-template/profile.php'), true ); ?>
    </div>

    <?php } ?>

    <?php do_action( 'bp_after_search_login_bar' ) ?>

    <?php if($tn_buddycorp_call_signup_on != ""){ ?>
    <?php } else { ?>
    <?php locate_template( array( 'lib/templates/wp-template/call-signup.php'), true ); ?>
    <?php } ?>

    <?php do_action( 'bp_before_container' ) ?>

    <?php if($bp_existed == 'true') { //check if bp existed ?>
    <div class="content">
    <?php if( !bp_is_blog_page() && bp_current_component() && !bp_is_directory() ) { ?>
    <?php locate_template( array( 'lib/templates/bp-template/userbar.php'), true ); ?>
    <?php } ?>
    <?php do_action( 'bp_before_content' ) ?>

    <?php } else { ?>
    <div class="content">
    <?php do_action( 'bp_before_content' ) ?>
    <?php } ?>

  • eileensventures
    • Design Lord, Child of Thor

    Yes......old version.........tried to install new version and it failed. So how do I update a theme? see error message below.

    Getting back to the code......so do I just change or delete the one line you have above.........or the whole string that deals with the login bar?

    Error message
    Unpacking the package…

    Installing the theme…

    Destination folder already exists. /home/aande608/public_html/gohealthynext.com/wp-content/themes/bp-corporate/

    Theme install failed.

  • eileensventures
    • Design Lord, Child of Thor

    I activated the auto updates and from the dashboard I was able to update the theme. Thanks. So in the preview mode from the dashboard I have eliminated the Login........... So I guess we can close this topic and resolve the look of the site in the other open topic. Thanks,

  • eileensventures
    • Design Lord, Child of Thor

    It is me again. My Theme is updated and I can't eliminate the login for some reason. So I am with you on line 271 being the same since I've updated the theme.

    I tried deleting line 271 and then putting // in front of line 271. Can you tell me which lines to change or delete? I want to keep the search, but delete the log in/sign up stuff.

    Here is Line 244 to Line 296
    </div>
    <?php } } ?>

    <?php do_action( 'bp_before_search_login_bar' ) ?>

    <?php if($bp_existed == 'true') { //check if bp existed ?>

    <?php if( !bp_is_register_page() ) { ?>

    <div id="searchbox">

    <form action="<?php echo bp_search_form_action() ?>" method="post" id="search-form">
    <input type="text" id="search-terms" name="search-terms" value="" />
    <?php echo bp_search_form_type_select() ?>
    <input type="submit" name="search-submit" id="search-submit" value="<?php _e( 'Search', TEMPLATE_DOMAIN ) ?>" />
    <?php wp_nonce_field( 'bp_search_form' ) ?>
    </form>
    <?php do_action( 'bp_search_login_bar' ) ?>

    <div id="fc_wrap">
    <?php if ( !is_user_logged_in() ) : ?>

    <?php do_action( 'bp_before_sidebar_login_form' ) ?>

    //<form name="login-form" class="mylogform" id="login-form" action="<?php echo site_url( 'wp-login.php' ) ?>" method="post">//
    <input type="text" name="log" id="user_login" value="<?php _e( 'Username', TEMPLATE_DOMAIN) ?>" onfocus="if (this.value == '<?php _e( 'Username', TEMPLATE_DOMAIN) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Username', TEMPLATE_DOMAIN) ?>';}" />
    <input type="password" name="pwd" id="user_pass" class="input" value="" />

    <input type="checkbox" checked="checked" name="rememberme" id="rememberme" value="forever" title="<?php _e( 'Remember Me', TEMPLATE_DOMAIN ) ?>" />

    <input type="submit" name="wp-submit" id="wp-submit" value="<?php _e( 'Log In', TEMPLATE_DOMAIN) ?>"/>
    <?php if ( bp_get_signup_allowed() ) : ?>
    <input type="button" name="signup-submit" id="signup-submit" value="<?php _e( 'Sign Up', TEMPLATE_DOMAIN) ?>" onclick="location.href='<?php echo bp_signup_page() ?>'" />
    <?php endif; ?>
    <input type="hidden" name="testcookie" value="1" />
    <?php do_action( 'bp_login_bar_logged_out' ) ?>
    </form>

    <?php do_action( 'bp_after_sidebar_login_form' ) ?>

    <?php else : ?>

    <div id="logout-link">
    <?php global $bp; bp_loggedin_user_avatar( 'width=20&height=20' ) ?>   "><?php echo $bp->loggedin_user->fullname; ?> / <?php bp_log_out_link() ?>
    <?php do_action( 'bp_login_bar_logged_in' ) ?>
    </div>

    <?php endif; ?>

    </div>

  • Philip John
    • DEV MAN’s Apprentice

    Remove lines 267-294 (inclusive) and that should take the form out. To be clear, this is the code you should remove:

    <?php if ( !is_user_logged_in() ) : ?>
    
    <?php do_action( 'bp_before_sidebar_login_form' ) ?>
    
    <form name="login-form" class="mylogform" id="login-form" action="<?php echo site_url( 'wp-login.php' ) ?>" method="post">
    <input type="text" name="log" id="user_login" value="<?php _e( 'Username', TEMPLATE_DOMAIN) ?>" onfocus="if (this.value == '<?php _e( 'Username', TEMPLATE_DOMAIN) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Username', TEMPLATE_DOMAIN) ?>';}" />
    <input type="password" name="pwd" id="user_pass" class="input" value="" />
    
    <input type="checkbox" checked="checked" name="rememberme" id="rememberme" value="forever" title="<?php _e( 'Remember Me', TEMPLATE_DOMAIN ) ?>" />
    
    <input type="submit" name="wp-submit" id="wp-submit" value="<?php _e( 'Log In', TEMPLATE_DOMAIN) ?>"/>
    <?php if ( bp_get_signup_allowed() ) : ?>
    <input type="button" name="signup-submit" id="signup-submit" value="<?php _e( 'Sign Up', TEMPLATE_DOMAIN) ?>" onclick="location.href='<?php echo bp_signup_page() ?>'" />
    <?php endif; ?>
    <input type="hidden" name="testcookie" value="1" />
    <?php do_action( 'bp_login_bar_logged_out' ) ?>
    </form>
    
    <?php do_action( 'bp_after_sidebar_login_form' ) ?>
    
    <?php else : ?>
    
    <div id="logout-link">
    <?php global $bp; bp_loggedin_user_avatar( 'width=20&height=20' ) ?> &nbsp; <a href="<?php bp_loggedinuser_link() ?>"><?php echo $bp->loggedin_user->fullname; ?></a> / <?php bp_log_out_link() ?>
    <?php do_action( 'bp_login_bar_logged_in' ) ?>
    </div>
    
    <?php endif; ?>

    Thanks

  • eileensventures
    • Design Lord, Child of Thor

    Tried but for some reason even though I deleted lines 267-294 inclusive from the header.php file and saved the file, when I preview the child theme the login is still in view.

    I have the header.php file under the bp-corporate-child folder where the style.css and the template-blog.php are located.

  • Mason
    • DEV MAN’s Sidekick

    Hiya,

    Anything further here? (Also worth noting this theme received an update last week) As we haven't heard back from you we're going to assume the problem was sorted out and mark this ticket as resolved.

    If it wasn't resolved, or you have any more questions related to this thread please feel free to post them below and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Otherwise, thanks for using the forums, and for being a member of WPMU DEV, it's a pleasure to help you out and we look forward to being of assistance in the future.

    Thanks

  • eileensventures
    • Design Lord, Child of Thor

    I really need one solution to my original question that was posted back on November 29th. I am confused and I don't see how your suggestion solves my problems.

    I want the searchbox, and it is still currently displayed (see below all the blue menus). I want to eliminate the log in that still shows. I have already created a Child css and modified the code as suggested by Phil, which has been verified by MasonJames that I followed the instructions. Now the menu above the area I wanted modified is all messed up.

    I really value my membership with WPMU, because I am learning this as I go and I will not be hiring a developer, but I must admit the turn around time has been a little slow on this request.

    All frustration aside, if the staff at WPMU can come to an agreement on what I should do and if your suggestion is the solution then I will proceed, what line should I place your #searchbox code? Did you mean login instead of searchbox????

  • Mason
    • DEV MAN’s Sidekick

    Hiya eileensventures,

    I think there was just a misunderstanding on what you were trying to remove.

    To be clear. You can use the default theme and child theme (versions 1.4.1 are the latest)

    Then, in your child theme add one line of CSS to the very bottom of style.css:

    #searchbox #fc_wrap {
    	display: none;
    }

    This will effectively hide the login/logout form in the secondary bar, but leave the search intact.

    Let us know if you have any further questions on this. Thanks!

  • eileensventures
    • Design Lord, Child of Thor

    I followed your instructions but still have issues. See screen shots for the last line in the child theme css, and for how the website looks when the child is activated.

    Not knowing what to do I deleted the child header.php and copied the theme header.php into the child file to restore it before the deletion of lines 267-294 (inclusive) and tried activating the child theme again.....same results.

  • Mason
    • DEV MAN’s Sidekick

    Hiya,

    There is no need to do anything with the header.php file. I still don't see the child theme currently active on your site. To make doubly sure you can write the lines like this:

    #searchbox #logout-link, #searchbox #login-form {
    	display: none!important;
    }

    This will completely remove the login/logout portions from that bar. No other edits are required. Note that you also need to be running the latest 1.4.1 or 1.4.2 versions of the theme and child theme.

    Please let us know how this goes. Thanks!

  • eileensventures
    • Design Lord, Child of Thor

    Hello........the login box is gone now. Thanks. But the spacing is off between the header and the menu bar, and the menu bar is messed up. See screen shots. I do not have the Child Theme Activated right now because it looks weird, however, I did activate and test it - see screen shots.

    Please advise what I should try now.

    Thanks,

    Eileen

  • Mason
    • DEV MAN’s Sidekick

    Hiya,

    When you activate the child theme, do you check and make sure you have a custom menu setup? It looks like your navigation is different in the screenshots and that may be the problem.

    Otherwise, there is something different in your child theme that I don't have - I'm simply unable to recreate this issue on my test install.

    Let me know if the above works (adding a menu). If not, I'll probably need logins to your site and permission to temporarily change the theme so I can see the code for myself.

    Thanks.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.