Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Dante › Two digits number in SF_iconbox
New Landing › How can we help? › Themeforest Theme Support › Dante › Two digits number in SF_iconbox
- This topic has 10 replies, 5 voices, and was last updated 9 years by Mohammad – SUPPORT.
-
Posted in: Dante
-
October 31, 2014 at 5:57 pm #124831
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
November 1, 2014 at 3:40 am #124850Hi,
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
MohammadNovember 12, 2014 at 7:45 pm #127776I 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
November 13, 2014 at 4:49 am #127851Hi,
Please remove that code and provide me website url with wordpress admin login detail so i can check and resolve the issue.
Thanks
MohammadNovember 25, 2014 at 6:36 pm #131076Hi 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,
StefanNovember 26, 2014 at 5:42 am #131188Hi,
There is no any solution beside of this code.
Thanks
MohammadNovember 26, 2014 at 12:04 pm #131289This reply has been marked as private.November 26, 2014 at 1:33 pm #131347Will assign this to Mohammad for you 🙂
November 28, 2014 at 6:36 pm #132179That would be nice 😉
Thank you.November 28, 2014 at 11:00 pm #132189No problem. Let’s wait for Mohammad to come online.
-RuiDecember 2, 2014 at 9:43 am #132697Hi,
Please provide me correct admin login detail to check and resolve the issue.
Thanks
Mohammad -
Posted in: Dante
You must be logged in and have valid license to reply to this topic.