• losrack

    (@carlos-jaramillo)


    Hi,

    I have this line of code that outputs “info” inside an a tag

    echo do_shortcode('<center><a href="'.$link.'" class="button addtocartbutton">Info</a></center>');

    I would like to output an icon instead of regular text “info”

    Is there a way to do this?

    Thanks

    • This topic was modified 7 years, 5 months ago by losrack.
Viewing 1 replies (of 1 total)
  • Hey,

    You can see some usage examples: https://fontawesome.io/examples/ -> of course that you need to install the font awesome icons in your site. And your code would be:

    echo do_shortcode('<center><a href="'.$link.'" class="button addtocartbutton"><i class="fa fa-camera-retro"></i></a></center>');

    Sincerely,
    John T.

Viewing 1 replies (of 1 total)
  • The topic ‘echo unicode / font awesome’ is closed to new replies.