Iconify icon as button icon

I have put

<script src="https://code.iconify.design/1/1.0.7/iconify.min.js"></script>

into head section, but I cannot figure out what to put in the button setup for the icon field to use this -

<span class="iconify" data-icon="simple-icons:sky"></span>

Any ideas please ?

Syntax for button's Icon field:
For example the home icon from "dashicons" admin home • Dashicons • Iconify
image

Also the iconify is now some version steps up.

<script src="https://code.iconify.design/2/2.0.3/iconify.min.js"></script>
1 Like

Thanks I have update head section and used iconify-simple-icons:sky
and this now works. Is there an easy way to change size please ?

There is easiest way in the world :slight_smile:

iconify-dashicons:admin-home 48px
1 Like

Thanks,

Sorry if I’m asking dumb questions but I couldn’t find relevant NR information on this subject.

At least this post will help others like me :wink:

It is not dumb question. As the dashboard is just a bunch of nodes but 1 person as maintainer it is not possible to have every corner covered in help files. But luckily there is common place for every node - the github page, where Readme covers most of basics.
Known that such idea can't be figured out by regular user but that's where the community works out best.

Hi, I spoke too soon.

Using the new iconify script is ok if used as an icon button node, but no longer works in text node label.
I note the format is different with new version, but even after updating my text nodes the icons do not display.

<script src="https://code.iconify.design/2/2.0.3/iconify.min.js"></script>
<span class="iconify" data-icon="fa-solid:hot-tub"></span>

image

The old syntax only works with the old script and not the new, so I cannot use the updated version, not sure what benefits it offers ?

<script src="https://code.iconify.design/1/1.0.7/iconify.min.js"></script>
<span class="iconify icon:fa-solid:hot-tub"></span>

No I dont know exactly. I haven't tried with text node. Sure if it does not work, the old script should be used. With old syntax.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.