Digital experiences for all disciplines
New Landing › How can we help? › Cardinal › Header contact slideout icon – change to text? (Cardinal)
New Landing › How can we help? › Cardinal › Header contact slideout icon – change to text? (Cardinal)
- This topic has 10 replies, 4 voices, and was last updated 9 years by Rui Guerreiro – SUPPORT.
-
Posted in: Cardinal
-
January 28, 2015 at 9:12 am #145014
I am using header version 6. I like the slideout contact page feature, but the built-in envelope icon is not appropriate for this site. I’d rather be able to use text/words as the link that activates the slideout. Can you give me the code changes that would enable me to write a few words of text in place of the envelope icon?
thank you
January 28, 2015 at 10:55 am #145075Hi,
Check inside the file in cardinal/swift-framework/core/sf-header.php
$contact_icon = apply_filters( 'sf_header_contact_icon', '<i class="ss-mail"></i>' );
by your content
$contact_icon = apply_filters( 'sf_header_contact_icon', 'My Words' );
-Rui
January 28, 2015 at 10:23 pm #145274Thank you!
January 28, 2015 at 11:43 pm #145283No problem.
-RuiJanuary 29, 2015 at 7:20 am #145308I altered this line, and put it in a folder in the child theme, nested within folders with names that match the main theme. Nothing changed. Is it impossible to do this to the child theme?
January 29, 2015 at 8:06 am #145320hi,
Please paste full code at functions.php of child theme.function sf_header_aux($aux) { global $sf_options; $show_cart = $sf_options['show_cart']; $show_wishlist = $sf_options['show_wishlist']; $header_left_config = $sf_options['header_left_config']; $header_right_config = $sf_options['header_right_config']; $header_left_text = __($sf_options['header_left_text'], 'swiftframework'); $header_right_text = __($sf_options['header_right_text'], 'swiftframework'); $fullwidth_header = $sf_options['fullwidth_header']; $contact_icon = apply_filters( 'sf_header_contact_icon', 'My Words' ); if ($aux == "left") { $header_left_output = ""; if ($header_left_config == "social") { $header_left_output .= do_shortcode('[social]'). "\n"; } else if ($header_left_config == "aux-links") { $header_left_output .= sf_aux_links('header-menu', TRUE, "header-1"). "\n"; } else if ($header_left_config == "overlay-menu") { $header_left_output .= '<a href="#" class="overlay-menu-link"><span>'.__("Menu", "swiftframework").'</span></a>'. "\n"; } else if ($header_left_config == "contact") { $header_left_output .= '<a href="#" class="contact-menu-link">'.$contact_icon.'</a>'. "\n"; } else if ($header_left_config == "search") { $header_left_output .= '<nav class="std-menu">'. "\n"; $header_left_output .= '<ul class="menu">'. "\n"; $header_left_output .= sf_get_search('aux'); $header_left_output .= '</ul>'. "\n"; $header_left_output .= '</nav>'. "\n"; } else { $header_left_output .= '<div class="text">'.do_shortcode($header_left_text).'</div>'. "\n"; } return $header_left_output; } else if ($aux == "right") { $header_right_output = ""; if ($header_right_config == "social") { $header_right_output .= do_shortcode('[social]'). "\n"; } else if ($header_right_config == "aux-links") { $header_right_output .= sf_aux_links('header-menu', TRUE, "header-1"). "\n"; } else if ($header_right_config == "overlay-menu") { $header_right_output .= '<a href="#" class="overlay-menu-link"><span>'.__("Menu", "swiftframework").'</span></a>'. "\n"; } else if ($header_right_config == "contact") { $header_right_output .= '<a href="#" class="contact-menu-link">'.$contact_icon.'</a>'. "\n"; } else if ($header_right_config == "search") { $header_right_output .= '<nav class="std-menu">'. "\n"; $header_right_output .= '<ul class="menu">'. "\n"; $header_right_output .= sf_get_search('aux'); $header_right_output .= '</li>'. "\n"; $header_right_output .= '</ul>'. "\n"; $header_right_output .= '</nav>'. "\n"; } else { $header_right_output .= '<div class="text">'.do_shortcode($header_right_text).'</div>'. "\n"; } return $header_right_output; } }
Thanks
MohammadJanuary 29, 2015 at 8:39 am #145342That worked! Thank you.
January 29, 2015 at 8:42 am #145345Hi,
You most welcome.
Thanks
MohammadJanuary 31, 2015 at 9:27 pm #146017hello. would it also be possible to load a small picture of a custom icon ?
January 31, 2015 at 10:14 pm #146024Being able to change the graphic would also be a great solution. I actually think I’d prefer that more.
February 2, 2015 at 10:40 pm #146524Yes, it’s possible, Use the code below instead.
$contact_icon = '<img src="http:://www.yoursite.com/image.png">';
-Rui
-
Posted in: Cardinal
You must be logged in and have valid license to reply to this topic.