Digital experiences for all disciplines
New Landing › How can we help? › Atelier › text / shortcode in header right of logo
New Landing › How can we help? › Atelier › text / shortcode in header right of logo
- This topic has 3 replies, 2 voices, and was last updated 7 years by Rui Guerreiro – SUPPORT.
-
Posted in: Atelier
-
May 16, 2017 at 10:41 am #324748
Hi,
I would like to have text right of the logo our left of my menu.
is that possible?header options – text/shortcode is enable.
can you help me? thank you.
kr,
PatrickMay 16, 2017 at 3:07 pm #324774Hi,
Can’t understand exactly what you are trying to achieve. Can you provide a mockup image of how you would like it to look?
Thanks-Rui
May 16, 2017 at 3:26 pm #324785Hi,
see attached.
in the purple field, i want to add some text.
is that possible?Patrick
Attachments:
You must be logged in to view attached files.May 16, 2017 at 4:15 pm #324802Hi,
There isn’t any specific field to add content in that area.
The only way is to customise the logo function to add your additional html/css.
You can copy the entire function to the functions.php file of your child theme and go from there./* LOGO ================================================== */ if ( ! function_exists( 'sf_logo' ) ) { function sf_logo( $logo_class, $logo_id = "logo" ) { //VARIABLES global $post, $sf_options; $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 ( function_exists('is_checkout') && is_checkout() ) { if ( $sf_options['minimal_checkout'] && $logo_class != "logo-left checkout-logo" ) { return; } } 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 ); } $page_header_alt_logo = apply_filters( 'sf_page_header_alt_logo', $page_header_alt_logo ); // 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 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">'; $h1_output = ''; if ( ! isset( $logo['url'] ) || $logo['url'] == "" ) { $h1_output = '<h1 class="logo-h1 standard">' . $logo_alt . '</h1>' . "\n"; } if ( ! isset( $retina_logo['url'] ) || $retina_logo['url'] == "" ) { $h1_output = '<h1 class="logo-h1 standard retina">' . $logo_alt . '</h1>' . "\n"; } $logo_output .= $h1_output; if ( $enable_logo_tagline && $logo_tagline != "" ) { $logo_output .= '<h2 class="logo-h2">' . $logo_tagline . '</h2>' . "\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">'; $h1_output = ''; if ( ! isset( $logo['url'] ) || $logo['url'] == "" ) { $h1_output = '<h1 class="logo-h1 standard">' . $logo_alt . '</h1>' . "\n"; } if ( ! isset( $retina_logo['url'] ) || $retina_logo['url'] == "" ) { $h1_output = '<h1 class="logo-h1 standard retina">' . $logo_alt . '</h1>' . "\n"; } $logo_output .= $h1_output; if ( $enable_logo_tagline && $logo_tagline != "" ) { $logo_output .= '<h2 class="logo-h2">' . $logo_tagline . '</h2>' . "\n"; } $logo_output .= '</div>' . "\n"; } $logo_output .= '</a>' . "\n"; $logo_output .= '</div>' . "\n"; // LOGO RETURN return $logo_output; } }
-Rui
-
Posted in: Atelier
You must be logged in and have valid license to reply to this topic.