• losrack

    (@carlos-jaramillo)


    Hi,

    I have this line of code…

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

    And I want to output an unicode icon instead of “info”

    I have tried so many things …

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Pasting the unicode character should do the trick. Replacing the “info” text with this horse won’t do the trick? ?

    I would suggest a better alternative would be to you use free icon library called Font Awesome. You should be able to find a similar icon that you need there. There should be some documentation on how to set up the CDN on their website.

    Furthermore, just as a recommendation. You shouldn’t need do_shortcode, there’s no shortcode in your string. a regular echo statement should suffice. This may, actually, fix your problem if do_shortcode() is escaping some characters.

Viewing 1 replies (of 1 total)
  • The topic ‘echo unicode in php’ is closed to new replies.