- This topic has 16 replies, 3 voices, and was last updated 8 years, 6 months ago by
Tom.
-
AuthorPosts
-
June 24, 2017 at 3:24 pm #338487
Jamal
Hi
Is there any way to change cart icon to fa-shopping-basket ?
June 24, 2017 at 5:44 pm #338507Leo
StaffCustomer SupportHi Jamal,
I could be wrong about this but I think you can simply add a custom link with the cart page as the URL and preferable icon as the navigation label.
Just tried it I didn’t see anything wrong with that.
Perhaps Tom would have a cooler way 🙂
June 24, 2017 at 6:51 pm #338528Tom
Lead DeveloperLead DeveloperRight now you would have to overwrite the icon:
.cart-contents .fa-shopping-cart:before { content: "\f291"; }I’ll be sure to add a filter here so it’s easier in the future.
June 25, 2017 at 8:17 am #338682Jamal
Perfect, works as intended. Thanks guys !
June 25, 2017 at 3:02 pm #338842Tom
Lead DeveloperLead DeveloperNo problem 🙂
August 15, 2017 at 10:15 am #366520Jamal
This is no longer working after updating to GP 1.4. How can i apply the filter
generate_woocommerce_menu_cart_icon? Returning my new icon doesn’t do the trick. Thanks in advanceAugust 15, 2017 at 2:15 pm #366725Tom
Lead DeveloperLead DeveloperThis should help: https://docs.generatepress.com/article/generate_woocommerce_menu_cart_icon/
Let me know 🙂
August 16, 2017 at 12:03 am #367002Jamal
Doesn’t seem to work unfortunately. It removes old icon but doesn’t replace it with fa-shopping-basket
August 16, 2017 at 7:43 am #367282Tom
Lead DeveloperLead DeveloperSo you’ve done this?:
add_filter( 'generate_woocommerce_menu_cart_icon', 'tu_change_wc_menu_cart_icon' ); function tu_change_wc_menu_cart_icon() { return '<i class="fa fa-shopping-basket" aria-hidden="true"></i>'; }August 16, 2017 at 12:41 pm #367512Jamal
Yes Tom i have done exactly that. This is a screenshot from the frontend [ Screenshot removed ]
August 16, 2017 at 6:37 pm #367664Tom
Lead DeveloperLead DeveloperAh, so the filter is working, but the icon isn’t.
Are you using the Font Awesome essentials filter by chance?
August 17, 2017 at 12:35 am #367764Jamal
No i checked that first thing. As usual, it must be something im doing wrong but can’t figure out what. After updating theme, this method was no longer working as well https://generatepress.com/forums/topic/woocommerce-change-cart-icon/#post-338528
August 17, 2017 at 9:06 am #368043Tom
Lead DeveloperLead DeveloperHmm, can you link me to the site?
August 17, 2017 at 12:57 pm #368228Jamal
Link removed
August 17, 2017 at 5:26 pm #368369Tom
Lead DeveloperLead DeveloperYou’re using a plugin that is taking over the Font Awesome file: https://fungi.cannysolutions.se/wp-content/plugins/load-more-products-for-woocommerce/css/font-awesome.min.css
It’s essential for developers who are enqueuing Font Awesome to add the version number, this way WordPress will use the latest version.
It seems this developer hasn’t added a version number, so it uses the WP version (4.8).
The current version of FA is 4.7, so WP is loading their stylesheet, even though they’re truly using FA 4.3 (which likely doesn’t have that icon in it).
-
AuthorPosts
- You must be logged in to reply to this topic.