B
B
Boy2017-02-05 05:03:56
Icons
Boy, 2017-02-05 05:03:56

How to replace text with font awesome icon in wordpress?

Good day!
I've connected Font Awesome to my WordPress theme, but I can't seem to replace the word Cart with an icon.

<button class="menu-cart-trigger"><span class="<?php echo esc_attr( $a_class ); ?>"><?php esc_html_e( 'Cart', 'pustaka' ); ?> </span><span class="cart-count"><?php echo WC()->cart->cart_contents_count; ?></span></button>

Here I replace the word Cart ('Cart', 'pustaka' ) with
<i class="fa fa-shopping-cart fa-2x" aria-hidden="true"></i>

When updating, the line itself appears - and again the word Cart
Also in the theme in the html pages there is this code:
<button class="menu-cart-trigger"><span class="text-gradient">Cart </span><span class="cart-count">12</span></button>

Tell me, please, what am I doing wrong?
Thank you!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question