Archived

This topic is now archived and is closed to further replies.

  • 0

Icon Font Shortcode Trying to create modal button with Font Awesome

Question

Posted · Report post

Delete

Share this post


Link to post
Share on other sites

6 answers to this question

Posted · Report post

The workaround is this:

[pl_modal title="Request Appointment" type="btn" colortype="info" label="<i class='icon-calendar'></i> Request Appointment "]
[gravityform id="1" name="Appointment Request" title="false"]
[/pl_modal]

Notes about the code above:

-goes in HTML (not Visual) Editor (not applicable if in a widget)

-doesn't use the shortcode

-uses single quotes for < i class =  ... because you don't want to accidentally close the label's double-quote just yet

Share this post


Link to post
Share on other sites

Posted · Report post

Can you paste your entire code? I don't see any [ i ] or [ / i ] in what you pasted.

Share this post


Link to post
Share on other sites

Posted · Report post

Here's the code in the widget:

 

[pl_modal title="Request Appointment" type="btn" colortype="info" label="[i]icon-calendar[/i] Request Appointment "]
[gravityform id="1" name="Appointment Request" title="false"]
[/pl_modal]

Share this post


Link to post
Share on other sites

Posted · Report post

Actually, this is the issue: http://codex.wordpress.org/Shortcode_API#Square_Brackets

 

The shortcode parser does not accept square brackets within attributes. Thus the following will fail:

[tag attribute="[some value]"]

 

 

As such, there's nothing I can do code-wise to "fix" it. It's a WordPress limitation.

 

You could put the icon font shortcode next to the gravity form shortcode, but not where you were wanting to, since that's the way the pl_modal shortcode attributes are setup.

 

 

Let me know if this answers your question and if you need help with any non-shortcode version of using icon fonts.

 

Thanks for your purchase.

Share this post


Link to post
Share on other sites

Posted · Report post

Hey Cliff-

 

Thanks for your quick responses and support.  I think I got it.

1 person likes this

Share this post


Link to post
Share on other sites

Posted · Report post

You're welcome.

Share this post


Link to post
Share on other sites