Support » Plugin: WordPress Button Plugin MaxButtons » Using shortcode instead of URL

  • Hi, I have the following code which opens fancybox containing my contact form upon clicking a link. Is there some way to alter this code such that I can use a button in place of the text link, but when clicked the button opens the fancy box? Original code below. Thanks.

    <a class="fancybox" href="#contact_form_pop">TEXT FOR LINK HERE</a>
    <div class="fancybox-hidden">
    <div id="contact_form_pop">[wysija_form id="1" title="Contact Form]</div>
    </div>
Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter StrugglingW

    (@strugglingw)

    Plugin Author johnbhartley

    (@johnbhartley)

    You could generate the button CSS with MaxButtons and then just check the “Use External CSS” and copy the CSS into your stylesheet. As long as you follow the same pattern as in the standard MaxButtons output you can add in the extra class=”” and href=”” however you like.

    Thread Starter StrugglingW

    (@strugglingw)

    Great! Forgive my amateur coding attempt, but how exactly would I combine the code. i.e. how would I put this existing code I quoted into:

    div.maxbutton-2-container { } a.maxbutton-2 { text …

    Sorry for being sense and thanks for the help!

    Thread Starter StrugglingW

    (@strugglingw)

    This is what I tried to put into the post, but only the text is appearing and not the button:

    <div align="center">
    <div id="maxbutton-5-container"><a id="maxbutton-5" href="http://www.advancedfictionwriting.com/art/snowflake.php">Test Button</a></div>
    </div>
    Plugin Author johnbhartley

    (@johnbhartley)

    Make sure when you create your button, you use the following settings:

    “Use Container” unchecked
    “Wrap with Center Div” unchecked
    “Use External CSS” checked

    <a class="maxbutton-5" href="http://www.advancedfictionwriting.com/art/snowflake.php">Test Button</a>

    That should give you the result you are looking for.

    Thread Starter StrugglingW

    (@strugglingw)

    Thanks for the help, that seems to work when I create a new defaul button, but for some reason when I make changes to the button these changes do not update in the CSS (when I click to view the CSS)?

    So, right now I can place a working button in the post using the instrcutions you describe, but I can’t edit it…

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Using shortcode instead of URL’ is closed to new replies.