New Landing How can we help? Cardinal Header contact slideout icon – change to text? (Cardinal)

Viewing 11 posts - 1 through 11 (of 11 total)
  • Posted in: Cardinal
  • #145014
    lbdesign
    Member
    Post count: 136

    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

    #145075
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    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

    #145274
    lbdesign
    Member
    Post count: 136

    Thank you!

    #145283
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    No problem.
    -Rui

    #145308
    lbdesign
    Member
    Post count: 136

    I 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?

    #145320
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    hi,
    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
    Mohammad

    #145342
    lbdesign
    Member
    Post count: 136

    That worked! Thank you.

    #145345
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You most welcome.
    Thanks
    Mohammad

    #146017
    MeineLiebe
    Member
    Post count: 155

    hello. would it also be possible to load a small picture of a custom icon ?

    #146024
    lbdesign
    Member
    Post count: 136

    Being able to change the graphic would also be a great solution. I actually think I’d prefer that more.

    #146524
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Yes, it’s possible, Use the code below instead.

    
     $contact_icon = '<img src="http:://www.yoursite.com/image.png">';

    -Rui

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register