New Landing How can we help? Themeforest Theme Support Dante Two digits number in SF_iconbox

Viewing 11 posts - 1 through 11 (of 11 total)
  • Posted in: Dante
  • #124831
    dloubier
    Member
    Post count: 9

    Hi how can I use two digits numbers in SF-Iconbox ?

    [sf_iconbox image=” character=’10’ type=’left-icon’ title=’We’re intelligent’ animation=’fade-from-right’ animation_delay=’1200′] Assurer la santé et la sécurité de nos clients et employés.
    [/sf_iconbox]

    Character=10 but displayed number on page is 1.

    Can you help ?

    Thanks

    #124850
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please insert given below php scripts at functions.php of child theme.

    function sf_icon($atts, $content = null) {
    		extract(shortcode_atts(array(
    			"size"			=> "",
    			"image"			=> "",
    			"character"		=> "",
    			"cont" 			=> "",
    			"float" 		=> "",
    			"color"			=> "",
    			"link"			=> "",
    			"target"		=> "_self",
    		), $atts));
    		
    		if (strlen($character) > 2) {
    			$character = substr($character, 0, 2);
    		}
    		
    		$icon_output = "";
    		
    		if ($cont == "yes") {
    			if ($character != "") {
    				$icon_output = '<div class="sf-icon-cont cont-'.$size.' sf-icon-float-'.$float.' sf-icon-'.$color.'"><span class="sf-icon-character sf-icon sf-icon-'.$size.'">'.$character.'</span></div>';
    			} else {
    				$icon_output = '<div class="sf-icon-cont cont-'.$size.' sf-icon-float-'.$float.' sf-icon-'.$color.'"><i class="'.$image.' sf-icon sf-icon-'.$size.'"></i></div>';
    			}
    		} else {
    			if ($character != "") {
    				$icon_output = '<span class="sf-icon-character sf-icon sf-icon-float-'.$float.' sf-icon-'.$size.' sf-icon-'.$color.'">'.$character.'</span>';
    			} else {
    				$icon_output = '<i class="'.$image.' sf-icon sf-icon-float-'.$float.' sf-icon-'.$size.' sf-icon-'.$color.'"></i>';	
    			}
    		}
    		
    		if ($link != "") {
    			$icon_output = '<a href="'.$link.'" target="'.$target.'" class="linked-icon">'.$icon_output.'</a>';
    		}
    		
    		return $icon_output;
    	}
    	add_shortcode('icon', 'sf_icon');
    

    Thanks
    Mohammad

    #127776
    dloubier
    Member
    Post count: 9

    I did so, and now I’m having a error message… sorry I’m not used to this kind of tweek.

    Error message is Fatal error: Cannot redeclare sf_icon() (previously declared in /home/cozymult/public_html/wp-content/themes/dante/functions.php:107) in /home/cozymult/public_html/wp-content/themes/dante/swift-framework/shortcodes.php on line 161

    #127851
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please remove that code and provide me website url with wordpress admin login detail so i can check and resolve the issue.
    Thanks
    Mohammad

    #131076
    stiffler3000
    Member
    Post count: 68

    Hi Mohammad,

    I would also need two characters for the iconboxes. I do not use it with the shortcodes but with the page builder. I have the same problem like dloubier. Is there any other solution to this despite adding the code?

    Kind regards,
    Stefan

    #131188
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    There is no any solution beside of this code.
    Thanks
    Mohammad

    #131289
    stiffler3000
    Member
    Post count: 68
    This reply has been marked as private.
    #131347
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Will assign this to Mohammad for you 🙂

    #132179
    stiffler3000
    Member
    Post count: 68

    That would be nice 😉
    Thank you.

    #132189
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    No problem. Let’s wait for Mohammad to come online.
    -Rui

    #132697
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please provide me correct admin login detail to check and resolve the issue.
    Thanks
    Mohammad

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