Skip Navigation

[Resolved] Inserting Font Awesome Icone in Views Post Edit Link Shortcode

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to include an icon in a post edit link.

Solution:
The wpv-post-edit-link shortcode accepts a 'text' argument for the link display text, and this argument can contain html, so a font-awesome icon might be added like so, for example:

[wpv-post-edit-link text='icon <i class="fa fa-edit"></i>']

100% of people find this useful.

This support ticket is created 5 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 5 replies, has 2 voices.

Last updated by Nigel 5 years, 5 months ago.

Assisted by: Nigel.

Author
Posts
#1273443

Tell us what you are trying to do?

I have this views short code in a view:
[wpv-post-edit-link text="Font Awesome Icon Here"]

And I would like to have the hyperlink display the following Font Awesome Icon:
<i class="far fa-edit"> or [icon name="edit"]

If I place either version of the Font Awesome icon shortcode / markup in the shortcode's "text=" area, it does not display.
I am using Font Awesome Free version 5.9.0.
Thanks

Is there any documentation that you are following?
https://toolset.com/forums/topic/use-font-icons-as-links-within-content-template/#post-1210428
https://toolset.com/forums/topic/using-a-fontawesome-shortcode-inside-types-url-custom-field-does-not-work/

What is the link to your site?
hidden link

#1273493

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2019-06-20 at 12.43.05.png

Hi Andrew

I just did a quick test to verify that you can include markup in the text, that's it's not stripped, and it is accepted.

So the following will add the i element to the page inside a link:

[wpv-post-edit-link text='icon <i class="fa fa-edit"></i>']

Checking the link to your site, Font Awesome doesn't appear to be added to the page (screenshot).

When you say you are using Font Awesome 5.9 I'm not sure how you are using it.

(Note that where Toolset uses Font Awesome it still uses version 4.9.)

#1273533

My issue is resolved now. Thank you!

#1273539

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

#1273543

I am going to address it within 24 hours in a new ticket. There are three issues:
1. The blocks error as previously described. Unfortunately prior to your message I deleted and recreated the error riddled blocks so I need to see if the error can be recreated. Previously once the blocks were corrupted it would not permit me to edit them;
2. The convenient "View With" custom post type selector at the top is great, but if the Content Template or View is image heavy, it would be great to have an option of the View With to be "Nothing" whereby was as the developers can just see our short-codes and Toolset Elements instead of the values from the custom post types - if this is possible this would be super helpful;
3. Lastly (and a minor issue), in all of the Toolset Blocks component the option to return to the "Classic Editor" in the right hand Document Block column is misspelled as "Clasic Editor".
4. A suggestion as mentioned previously - I would take a close look at not only working with Kadence but also CoBlocks which has now been taken over by GoDaddy. Unfortunately at the time of my testing there were a lot of the Blocks Resolution Corruption errors but it has a lot of great template design features that will enable many users to do away with page builders altogether.

Thanks!

#1273673

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

OK, thanks for those details, I'll await the new thread you create to investigate further, and I'll pass on your general feedback above.

I'll re-close this.