This topic has 12 replies, 3 voices, and was last updated 7 months ago ago by Andrew Mitchell
Hello i am trying to replace some of the old fontawesome icons to their new versions and i cannot as unicode for new and old is the same and the old ones are displayed.
Hi @fyshlas,
You can try with this custom CSS:
i.et-icon.et-user-2 {
background: url(https://icons.veryicon.com/png/o/internet--web/prejudice/user-128.png) no-repeat center center;
background-size: 100%;
}
i.et-icon.et-user-2::before {
opacity: 0;
}
Do the same as with the other icons.
Hope it helps!
Can you please tell me where these icon classes are stored?
Hi @fyshlas,
All the icon classes you can find in this file: /wp-content/themes/xstore/css/xstore-icons.css
From the code you gave me it means that i will have to change all classes of the elements/icons i want to use. Is there another way? just to call the these svgs in the classes already presented in the theme?
You don’t have to update all the icon classes, you just need to change the classes which you’re using on your website.
Best Regards,
The 8Theme Team.
I am using royal theme and there is no folder shortcodes in css
Hi @fyshlas,
Sorry for the confusion!
The Royal theme is using the FontAwesome icons, so you can look into this file: wp-content/themes/royal/css/font-awesome.min.css
The custom CSS codes would be:
i.fa.fa-map-marker {
background: url(https://icons.veryicon.com/png/o/internet--web/prejudice/user-128.png) no-repeat center center;
background-size: 100%;
}
i.fa.fa-map-marker::before {
opacity: 0;
}
Best Regards,
The 8Theme Team.
No worries but its still not working for me
Hi @fyshlas,
Did you mean these icons on the header?
If yes, please try with this custom CSS instead:
/* user icon */
.navbar-right li.login-link.lastItem.firstItem a, .navbar-right li.my-account-link.firstItem a {
background: url(https://spyrosnicolaides.com/nutcracker/wp-content/uploads/2024/04/user-solid.svg) no-repeat 12px center;
background-size: 15px;
}
.navbar-right li.login-link.lastItem.firstItem a:before, .navbar-right li.my-account-link.firstItem a:before {
opacity: 0;
}
Let us know how it goes!
Thank you, the css did the trick but im facing issues with mobile version not displaying due to opacity 0 when hidding the previous icon from font awesome.
As these are the new version of font awesome is there a way to replace the version so this css is not needed and the icons are called automatically?
Hi @fyshlas,
We need to update the custom CSS codes a little bit to make it work on mobile:
/* user icon */
.navbar-right li.login-link.lastItem.firstItem a, .navbar-right li.my-account-link.firstItem a {
background: url(https://spyrosnicolaides.com/nutcracker/wp-content/uploads/2024/04/user-solid.svg) no-repeat 12px center;
background-size: 15px;
}
.navbar-right li.login-link.lastItem.firstItem a:before, .navbar-right li.my-account-link.firstItem a:before {
opacity: 0;
}
@media (max-width: 480px){
.navbar-right li.login-link.lastItem.firstItem a, .navbar-right li.my-account-link.firstItem a {
display: block;
background-position-x: left;
}
}
For the menu icon, please add this custom CSS code:
.menu-icon::before {
opacity: 0;
}
.menu-icon {
background: url(https://spyrosnicolaides.com/nutcracker/wp-content/uploads/2024/04/user-solid.svg) no-repeat center center;
background-size: 15px;
}
For the hover color, please take a look at this article: https://stackoverflow.com/questions/19777463/change-css-background-image-svg-paint-behavior-on-hover.
You have to swtich to the SVG inline.
Best Regards,
The 8Theme Team.
Thank you
Dear fyshlas,
In the spirit of gratitude, we want to express our appreciation for your trust in our products. As a valued customer, your experience matters greatly. Would you consider sharing it by giving our theme a deserving 5-star rating on ThemeForest?
Click here to share your thoughts: https://themeforest.net/downloads
Being part of our community means a lot, and your feedback contributes immensely.
Best Regards,
The 8Theme Team
The issue related to '‘Replace old font awesome icons with new version ones 6.4.2 svg’' has been successfully resolved, and the topic is now closed for further responses