Digital experiences for all disciplines
New Landing › How can we help? › Atelier › A question regarding sf_fonts
New Landing › How can we help? › Atelier › A question regarding sf_fonts
- This topic has 23 replies, 4 voices, and was last updated 9 years by Rui Guerreiro – SUPPORT.
-
Posted in: Atelier
-
June 22, 2015 at 5:52 pm #187139
Hi Swiftideas,
I tricky challenge: the contact and search options in the header use specific sf font icons. Is it possible to replace these with more generic google font icons?
It is not that they are not pretty, but I am integrating a few external pages in my site and when displaying the icon they cause an error:
“Font from origin ‘my Atelier site’ has been blocked from loading by Cross-Origin Resource Sharing policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘my external page’ is therefore not allowed access.”
So I either need to replace the two font icons or add the right header to the right font file 🙂
Thanks,
JohanJune 22, 2015 at 5:57 pm #187141This reply has been marked as private.June 22, 2015 at 6:02 pm #187146Hi Rui,
This is different. I get this when loading from a different domain that I am integrating, which doesn’t live on the same server: http://testpeijnenburg.photoshelter.com/. I managed to get everything working. Just this part doesn’t 🙁
Thanks,
JohanJune 24, 2015 at 3:23 pm #188129Hi,
Didn’t saw any error in the console of the other site, but that won’t work because of what I explained above. Since the domains are different that’s interpreted by the browser has a security breach and it’s denied the request.
Regarding your initial request. Add the code below to your functions.php of the child theme and adjust the html code for the return icon.
function sf_atelier_header_my_custom_contact_icon() { return '<i class="fa-envelope-o"></i>'; } add_filter('sf_header_contact_icon', 'sf_atelier_header_my_custom_contact_icon', 99); function sf_atelier_header_my_custom_search_icon() { return '<i class="sf-icon-search"></i>'; } add_filter('sf_header_search_icon', 'sf_atelier_header_my_custom_search_icon', 99);
EDITED- I adjusted the function of the bottom because it was incorrect.
-Rui
June 24, 2015 at 4:28 pm #188163Thanks Rui! Can’t try it right away because I am away but will try that code early next week.
June 26, 2015 at 9:13 am #188908Ok no problem
July 1, 2015 at 2:50 pm #190648Hi Rui & Kyle,
I am back and tried the code above. The contact one does replace the icon. The search one doesn’t yet. Tried to solve it by replacing
<i class="sf-icon-search"></i>
with<i class="fa-search"></i>
, but no result yet …In addition: these buttons have a transition behind it. So the transition and the resulting icon would have to be changed as well …
Thanks,
JohanJuly 2, 2015 at 7:18 pm #191236Hi,
Can you provide me the site url and ftp access so I can give it a try.
Not sure about the animation, do you want to remove the current animations?-Rui
July 2, 2015 at 7:41 pm #191246This reply has been marked as private.July 2, 2015 at 7:50 pm #191251Don’t worry with your live site. I’m leaving at the moment(don’t have enough time to check it) and will check this issue in the morning.
Thanks
-Rui
July 3, 2015 at 1:56 pm #191529Hi,
couldn’t figure out why the search filter wasn’t working, so as an alternative I added the function sf_get_search() to the functions.php and replaced the icon there.
Also add the code below to adjust the size and the vertical position.
.menu-search .fa-search{ font-size:24px; } .menu-search{ margin-top: 9px; }
-Rui
July 3, 2015 at 4:56 pm #191607Hi Rui,
Included the extra CSS. The only problem now is that the search has changed from being a full screen search to a standard search (although the theme options are still set to fullscreen search) …
Thanks,
JohanJuly 3, 2015 at 5:06 pm #191610Hi Rui,
Went into theme options, selected standard search, saved, switched back to fullscreen search, saved ….. and now fulscreen search is working again 🙂
Cheers,
JohanJuly 3, 2015 at 5:09 pm #191613Nope … now it is a standard search again. Seems like something is resetting something in the back ….
July 3, 2015 at 5:12 pm #191614Hi,
Sorry, it was me changing the code.
Check again.
maybe it will be necessary to adjust the css with this one.#header .aux-item ul.menu>li>a.header-search-link i { height: 38px!important; }
-Rui
-
Posted in: Atelier
You must be logged in and have valid license to reply to this topic.