Disable Mobile Nav Toggle

Is there a way to disable this. I am using UberMenu with BB Theme and want to use it’s mobile nav indicator. BB Theme is duplicating this.

thanks, Chris

Hey Chris,

Thanks for getting in touch! Try adding this in your functions.php file.

function my_nav_toggle_text( $text ) { 
    return '';
}
add_filter( 'fl_nav_toggle_text', 'my_nav_toggle_text' );

Let us know how it goes! :slight_smile:

Ben

Hello, I get this error when I try to update the child’s functions.php file:

Parse error: syntax error, unexpected ‘&’ in /usr/www/users/uni/dev-bbt.tep.2015/wp-content/themes/bb-theme-child/functions.php on line 15

Thanks, Chris

Hi Chris,

I tested this and it works for me. Are you sure there isn’t an error in some other piece of code in your functions.php file? Can you post all of your code for us to check out?

Justin

here is what is in the child theme php:

/*
Theme Name: Beaver Builder Child Theme
Theme URI: http://forum.wpbeaverbuilder.com
Version: 1.0
Description: An example child theme that can be used as a starting point for custom development.
Author: The Beaver Builder Team
Author URI: http://www.fastlinemedia.com
template: bb-theme
*/

/* Add your custom styles here… */

.page-id-2504 .fl-page-content {
background: #2A2A2A;
}

.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit, .woocommerce #content input.button, .woocommerce-page a.button, .woocommerce-page button.button, .woocommerce-page input.button, .woocommerce-page #respond input#submit, .woocommerce-page #content input.button {
background: #2E71C4 none repeat scroll 0 0;
color: #FFFFFF;
}

Hey Chris,

We actually need to see the code in functions.php. Can you post that?

Justin

Sorry :slight_smile:

<?php

// Defines
define( ‘FL_CHILD_THEME_DIR’, get_stylesheet_directory() );
define( ‘FL_CHILD_THEME_URL’, get_stylesheet_directory_uri() );

// Classes
require_once ‘classes/class-fl-child-theme.php’;

// Actions
add_action( ‘fl_head’, ‘FLChildTheme::stylesheet’ );

/* remove menu button for small devices - from BB support */

function my_nav_toggle_text( $text ) {
return '';
}
add_filter( 'fl_nav_toggle_text', 'my_nav_toggle_text' );

It looks like some of the single quotes got messed up during copy/paste. Give this a shot…

<?php

// Defines
define( ?FL_CHILD_THEME_DIR?, get_stylesheet_directory() );
define( ?FL_CHILD_THEME_URL?, get_stylesheet_directory_uri() );

// Classes
require_once 'classes/class-fl-child-theme.php';

// Actions
add_action( 'fl_head', 'FLChildTheme::stylesheet' );

/* remove menu button for small devices - from BB support */

function my_nav_toggle_text( $text ) {
return '';
}
add_filter( 'fl_nav_toggle_text', 'my_nav_toggle_text' );

I get this error message:

Parse error: syntax error, unexpected ‘?’ in /usr/www/users/uni/dev-bbt.tep.2015/wp-content/themes/bb-theme-child/functions.php on line 4

this is what i pasted:

<?php

// Defines
define( ?FL_CHILD_THEME_DIR?, get_stylesheet_directory() );
define( ?FL_CHILD_THEME_URL?, get_stylesheet_directory_uri() );

// Classes
require_once 'classes/class-fl-child-theme.php';

// Actions
add_action( 'fl_head', 'FLChildTheme::stylesheet' );

/* remove menu button for small devices - from BB support */

function my_nav_toggle_text( $text ) {
return '';
}
add_filter( 'fl_nav_toggle_text', 'my_nav_toggle_text' );

For some reason, the single quotes are getting messed up. Replace the question marks with single quotes here…

define( ?FL_CHILD_THEME_DIR?, get_stylesheet_directory() );
define( ?FL_CHILD_THEME_URL?, get_stylesheet_directory_uri() );

Justin

I did that and pasted the code below. Now the error has moved:

Parse error: syntax error, unexpected ‘&’ in /usr/www/users/uni/dev-bbt.tep.2015/wp-content/themes/bb-theme-child/functions.php on line 8

What is causing the characters to change? I am using TextWrangler via ftp…

<?php

// Defines
define( ‘FL_CHILD_THEME_DIR’, get_stylesheet_directory() );
define( ‘FL_CHILD_THEME_URL’, get_stylesheet_directory_uri() );

// Classes
require_once 'classes/class-fl-child-theme.php';

// Actions
add_action( 'fl_head', 'FLChildTheme::stylesheet' );

/* remove menu button for small devices - from BB support */

function my_nav_toggle_text( $text ) {
return '';
}
add_filter( 'fl_nav_toggle_text', 'my_nav_toggle_text' );

For some reason, characters are getting translated to other characters in the emails. I went back to an earlier post from the forum, copied that and that seemed to solve the problem. Do you have any idea what is going on? I would like not to repeat this and waste time for you or myself.

Thanks, Chris

It did remove the text but left the bar. I have an image if there is a way to send that.

Great! It sounds like your email program may be changing the character encoding for one reason or another. I’m not entirely sure why, but it’s probably because we’re pasting code and not normal text. Either way, I’m glad to hear it’s working :slight_smile:

Justin

It did remove the text but left the bar. I have an image if there is a way to send that.

Hi Chris,

Sorry for the confusion. That filter is meant to replace the text, not hide the bar. To hide the bar, you’ll need to use some CSS…

.fl-page-nav .navbar-toggle { display:none; }

Justin