Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Uplift › Removing mobile menu
New Landing › How can we help? › Themeforest Theme Support › Uplift › Removing mobile menu
- This topic has 11 replies, 4 voices, and was last updated 8 years by Rui Guerreiro – SUPPORT.
-
Posted in: Uplift
-
September 21, 2016 at 2:47 pm #292785
Hi there
I have a small landing page that doesn’t need a menu.
How do I remove it in mobile view as it opens a blank menu currently.Kind Regards
September 22, 2016 at 6:02 am #292867Hi,
Please always provide me specific page url with issue to check and resolve the issue.
Thanks
MohammadSeptember 22, 2016 at 11:12 am #292935there it is, thank you
I am also hoping to make the menu logo actually go back to the hosting site ie 192.com and not back to partner.192.com.
How would I achieve this?September 22, 2016 at 11:32 am #292940Hi,
to hide the menu in that page add the code below to your custom css option in the theme options.
.home .mobile-header-opts { display: none; }
Regarding the alternative link try the copy the code below to your child theme functions.php
/* LOGO ================================================== */ if ( ! function_exists( 'sf_logo' ) ) { function sf_logo( $logo_class, $logo_id = "logo" ) { //VARIABLES global $post; $sf_options = sf_get_theme_opts(); $show_cart = false; $sticky_header_transparent = false; if ( isset($sf_options['show_cart']) ) { $show_cart = $sf_options['show_cart']; } $logo = $retina_logo = $light_logo = $dark_logo = $alt_logo = array(); $header_type = "standard"; $page_header_alt_logo = false; if ( $post && !is_search() ) { $header_type = sf_get_post_meta( $post->ID, 'sf_page_header_type', true ); $page_header_alt_logo = sf_get_post_meta( $post->ID, 'sf_page_header_alt_logo', true ); $sticky_header_transparent = sf_get_post_meta( $post->ID, 'sf_sticky_header_transparent', true ); } // Shop page check $shop_page = false; if ( ( function_exists( 'is_shop' ) && is_shop() ) || ( function_exists( 'is_product_category' ) && is_product_category() ) ) { $shop_page = true; } if ( $shop_page ) { if ( isset($sf_options['woo_page_header']) ) { $header_type = $sf_options['woo_page_header']; } } // Standard Logo if ( isset( $sf_options['logo_upload'] ) ) { $logo = $sf_options['logo_upload']; } // Retina Logo if ( isset( $sf_options['retina_logo_upload'] ) ) { $retina_logo = $sf_options['retina_logo_upload']; } // Light Logo if ( isset( $sf_options['light_logo_upload'] ) ) { $light_logo = $sf_options['light_logo_upload']; } if ( isset( $light_logo['url'] ) && $light_logo['url'] != "" && ( $header_type == "naked-light" || $header_type == "naked-dark" || $sticky_header_transparent ) ) { $logo_class .= " has-light-logo"; } // Dark Logo if ( isset( $sf_options['dark_logo_upload'] ) ) { $dark_logo = $sf_options['dark_logo_upload']; } if ( isset( $dark_logo['url'] ) && $dark_logo['url'] != "" && ( $header_type == "naked-light" || $header_type == "naked-dark" || $sticky_header_transparent ) ) { $logo_class .= " has-dark-logo"; } // Alt Logo if ( isset( $sf_options['alt_logo_upload'] ) && $page_header_alt_logo ) { $alt_logo = $sf_options['alt_logo_upload']; } if ( isset( $retina_logo['url'] ) && $retina_logo['url'] == "" && $logo['url'] != "" ) { $retina_logo['url'] = $logo['url']; } if ( isset( $logo['url'] ) && $logo['url'] != "" ) { $logo_class .= " has-img"; } else { $logo_class .= " no-img"; } $logo_output = ""; $logo_alt = get_bloginfo( 'name' ); $logo_tagline = get_bloginfo( 'description' ); $logo_link_url = apply_filters( 'sf_logo_link_url', home_url() ); $enable_logo_tagline = false; if ( isset( $sf_options['enable_logo_tagline'] ) ) { $enable_logo_tagline = $sf_options['enable_logo_tagline']; } // Animation $logo_anim = ""; if ( isset( $sf_options['logo_hover_anim'] ) ) { $logo_anim = $sf_options['logo_hover_anim']; } /* LOGO OUTPUT ================================================== */ $logo_output .= '<div id="' . $logo_id . '" class="' . $logo_class . ' clearfix" data-anim="' . $logo_anim . '">' . "\n"; $logo_output .= '<a href="' . $logo_link_url . '">' . "\n"; if ( $logo_id == "mobile-logo" && sf_theme_supports('mobile-logo-override') ) { $mobile_logo = $mobile_retina_logo = ""; if ( isset( $sf_options['mobile_logo_upload'] ) ) { $mobile_logo = $sf_options['mobile_logo_upload']; } if ( isset( $sf_options['mobile_retina_logo_upload'] ) ) { $mobile_retina_logo = $sf_options['mobile_retina_logo_upload']; } // Standard Mobile Logo $mobile_logo['url'] = 'http://www.192.com'; if ( isset( $mobile_logo['url'] ) && $mobile_logo['url'] != "" ) { $logo_output .= '<img class="standard" src="' . $mobile_logo['url'] . '" alt="' . $logo_alt . '" height="' . $mobile_logo['height'] . '" width="' . $mobile_logo['width'] . '" />' . "\n"; } else if ( isset( $logo['url'] ) && $logo['url'] != "" ) { $logo_output .= '<img class="standard" src="' . $logo['url'] . '" alt="' . $logo_alt . '" height="' . $logo['height'] . '" width="' . $logo['width'] . '" />' . "\n"; } // Retina Logo if ( isset( $mobile_retina_logo['url'] ) && $mobile_retina_logo['url'] != "" ) { $logo_height = intval( $mobile_retina_logo['height'], 10 ) / 2; $logo_width = intval( $mobile_retina_logo['width'], 10 ) / 2; $logo_output .= '<img class="retina" src="' . $mobile_retina_logo['url'] . '" alt="' . $logo_alt . '" height="' . $logo_height . '" width="' . $logo_width . '" />' . "\n"; } else if ( isset( $retina_logo['url'] ) && $retina_logo['url'] != "" ) { $logo_height = intval( $retina_logo['height'], 10 ) / 2; $logo_width = intval( $retina_logo['width'], 10 ) / 2; $logo_output .= '<img class="retina" src="' . $retina_logo['url'] . '" alt="' . $logo_alt . '" height="' . $logo_height . '" width="' . $logo_width . '" />' . "\n"; } // Alt Logo if ( isset( $alt_logo['url'] ) && $alt_logo['url'] != "" && $page_header_alt_logo ) { $logo_output .= '<img class="alt-logo" src="' . $alt_logo['url'] . '" alt="' . $logo_alt . '" height="' . $alt_logo['height'] . '" width="' . $alt_logo['width'] . '" />' . "\n"; } // Text Logo $logo_output .= '<div class="text-logo">'; if ( ! isset( $logo['url'] ) || $logo['url'] == "" ) { $logo_output .= '<h1 class="logo-h1 standard">' . $logo_alt . '</h1>' . "\n"; } if ( ! isset( $retina_logo['url'] ) || $retina_logo['url'] == "" ) { $logo_output .= '<h1 class="logo-h1 retina">' . $logo_alt . '</h1>' . "\n"; } if ( $enable_logo_tagline && $logo_tagline != "" ) { $logo_output .= '<h2 class="logo-h2">' . $logo_tagline . '</h1>' . "\n"; } $logo_output .= '</div>' . "\n"; } else { // Standard Logo if ( isset( $logo['url'] ) && $logo['url'] != "" ) { $logo_output .= '<img class="standard" src="' . $logo['url'] . '" alt="' . $logo_alt . '" height="' . $logo['height'] . '" width="' . $logo['width'] . '" />' . "\n"; } // Retina Logo if ( isset( $retina_logo['url'] ) && $retina_logo['url'] != "" ) { $logo_height = intval( $retina_logo['height'], 10 ) / 2; $logo_width = intval( $retina_logo['width'], 10 ) / 2; $logo_output .= '<img class="retina" src="' . $retina_logo['url'] . '" alt="' . $logo_alt . '" height="' . $logo_height . '" width="' . $logo_width . '" />' . "\n"; } // Light Logo if ( isset( $light_logo['url'] ) && $light_logo['url'] != "" && ( $header_type == "naked-light" || $header_type == "naked-dark" || $sticky_header_transparent ) ) { $logo_output .= '<img class="light-logo" src="' . $light_logo['url'] . '" alt="' . $logo_alt . '" height="' . $light_logo['height'] . '" width="' . $light_logo['width'] . '" />' . "\n"; } // Dark Logo if ( isset( $dark_logo['url'] ) && $dark_logo['url'] != "" && ( $header_type == "naked-light" || $header_type == "naked-dark" || $sticky_header_transparent ) ) { $logo_output .= '<img class="dark-logo" src="' . $dark_logo['url'] . '" alt="' . $logo_alt . '" height="' . $dark_logo['height'] . '" width="' . $dark_logo['width'] . '" />' . "\n"; } // Alt Logo if ( isset( $alt_logo['url'] ) && $alt_logo['url'] != "" && $page_header_alt_logo ) { $logo_output .= '<img class="alt-logo" src="' . $alt_logo['url'] . '" alt="' . $logo_alt . '" height="' . $alt_logo['height'] . '" width="' . $alt_logo['width'] . '" />' . "\n"; } // Text Logo $logo_output .= '<div class="text-logo">'; if ( ! isset( $logo['url'] ) || $logo['url'] == "" ) { $logo_output .= '<h1 class="logo-h1 standard">' . $logo_alt . '</h1>' . "\n"; } if ( ! isset( $retina_logo['url'] ) || $retina_logo['url'] == "" ) { $logo_output .= '<h1 class="logo-h1 retina">' . $logo_alt . '</h1>' . "\n"; } if ( $enable_logo_tagline && $logo_tagline != "" ) { $logo_output .= '<h2 class="logo-h2">' . $logo_tagline . '</h1>' . "\n"; } $logo_output .= '</div>' . "\n"; } $logo_output .= '</a>' . "\n"; $logo_output .= '</div>' . "\n"; // LOGO RETURN return $logo_output; } } /* TOP BAR MENU ================================================== */ if ( ! function_exists( 'sf_top_bar_menu' ) ) { function sf_top_bar_menu() { $tb_menu_args = array( 'echo' => false, 'theme_location' => 'top_bar_menu', 'walker' => new sf_alt_menu_walker, 'fallback_cb' => '', ); // MENU OUTPUT $tb_menu_output = '<nav class="std-menu clearfix">' . "\n"; if ( function_exists( 'wp_nav_menu' ) ) { if ( has_nav_menu( 'top_bar_menu' ) ) { $tb_menu_output .= wp_nav_menu( $tb_menu_args ); } else { $tb_menu_output .= '<div class="no-menu">' . __( "Please assign a menu to the Top Bar Menu in Appearance > Menus", 'uplift' ) . '</div>'; } } $tb_menu_output .= '</nav>' . "\n"; return $tb_menu_output; } }
Let me know if it worked.
-Rui
September 27, 2016 at 3:34 pm #293499Hi there,
The mobile menu fixed worked like a charm.
We dont have a child theme or the ability to get into the php files. Is there any other way to fix this?
I am not a dev so, What exactly is a child theme?
Out of curiosity, with what I have, would it still be possible to create a child theme without losing what I have?Kind Regards
September 29, 2016 at 10:01 am #293757Hi,
I have attached a child theme so please upload and activate it. After that you can paste the code at functions.php of child theme.
Thanks
MohammadSeptember 29, 2016 at 10:10 am #293759Thanks Mohammed.
I dont see any attachments, am I missing something?
Will i lose what I have created by activating this child theme?
September 29, 2016 at 10:13 am #293760Hi,
You may lose only the theme settings.
Thanks
MohammadAttachments:
You must be logged in to view attached files.October 7, 2016 at 12:00 pm #295150Hi there, that code doesn’t work for letting the logo link to the home page.
It also breaks the logo when in mobile view.
And, does that code include the logo to link to the home page in all sizes?Kind Regards
October 10, 2016 at 9:41 am #295424The home link will go back to your homepage URL as set in Settings => Reading => Front page.
Please add a WP admin login.
October 25, 2016 at 1:59 pm #298550Hi david, that did not work. I think you didn’t understand the problem.
Rui, I don’t believe that piece of code worked. I pasted into the functions.php of our non child theme and it broke the logo as well as it didn’t take us to the desired page.
October 25, 2016 at 2:22 pm #298555Hi,
It’s suppose to work it’s the same logo function that comes with the theme I only added your specific url.
Will need ftp access to check the code you placed.-Rui
-
Posted in: Uplift
You must be logged in and have valid license to reply to this topic.