Hi there, sorry to reopen this after so long. I just started to use Twemoji in my website thanks to hugo-mod-twemoji
. I’m looking for a way to include custom SVGs in a simple way and found this, which would be great since the custom SVGs could be included just using some escape characters before and after the name of the icon (filename).
I’m wondering if the replaceRE
function can be used in a shortcode. In my website I’m using Wowchemy, which implements this shortcode to include icons. It’d be great if I could use the technique documented here to easily include custom SVGs.
Could you share an example of using this so it can detect custom codes and replace them with SVGs? Ideally normal emojis should still be able to work, so perhaps the escape characters could be different (not :
).
Thank you very much in advance,
Rodrigo