Jump to content
webmktco

Trying to create modal button with Font Awesome

Recommended Posts

Guest   
Guest

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
webmktco+    21
webmktco

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
Guest   
Guest

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
Guest   
Guest

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
webmktco+    21
webmktco

Hey Cliff-

 

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

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • bbudeck
      By bbudeck
      I use font aweseome icons regurarly with pagelines and recently encountered several, that simply won't show up in the output page.

      a few that simpy don't work for me are icon-anchor, icon-archive, icon-bug...all others around them or in between from the list (http://docs.pagelines.com/tutorials/font-awesome) work perfectly.

      I use the following syntax 
      [i]icon-archive[/i]  for all icons. Icons like icon-info-sign work, others simply won't be displayed at all.
      Shortcode conflict should make all icons disappear I guess. I'm using the plugin Icon Font Shortcode (http://www.pagelinestheme.com/icon-font-shortcode/).
       
      I thought this plugin used the same icons list provided in the pagelines docs, as it refrences it.
×