Adding custom icons to cornerstone buttons

Hello,

I would like to add a custom icons to a couple different buttons using cornerstone.
Is there a simple way to achieve this? Or not that simple is fine too.

This is my post where I would like to implement this is https://wp-dev.thoughtexchange.com/stories/example-post/

I have a different post type that uses custom fields and is custom coded that has button icons like I want to use with cornerstone: https://wp-dev.thoughtexchange.com/customer-stories/chula-vista-elementary-school-district/

What would be the best way to have the same custom icons in buttons built with cornerstone?

Thanks very much for any help with this one!

Hi There,

Button element in Cornerstone doesn’t support custom icon. Don’t worry, there’s a work around. We can use the button shortcode. Add it in a Text or RAW content element. See this guide: http://demo.theme.co/integrity-1/shortcodes/buttons/. Add the code for your custom icon beside the text inside the button shortcode.

Hope this helps.

Will it support icons in the future though?

Hello,

We can’t tell you when this feature will be supported, but follow our blog and the news.

Cheers :slight_smile:

Thanks. So how do I add my own icon to the button short code? How do I create a custom icon to enter in the [icon type=“myicon”] parameter or the short code?

I’d like to use an icon from the media gallery if possible.

Thanks for any more help with this one.

Hi There,

It will depend on your icon format. Is it an image? Let say you have an image, something like this:
[x_button type="real" shape="square" size="x-large" href="#example" title="Example"][x_image type="rounded" src="http://yourdomain.com/image-icon-url-here.jpg" alt="Text"]Square Button[/x_button]

Now change the URL of the image. Note that shortcodes are now prepend with x_. You can see it on our changelog.

Hope this helps.

That’s great thanks!

Hi @NinjaTeX,

Let us know how it goes.

Feel free to ask us again.

Thanks.

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