Question

Here is my shortcode:

[contact-form-7 id="1735" title="Contact form 1"]

To execute it, I need it in links (Ex.http://html.com). How to convert this short code to link? Is it possible?

No correct solution

OTHER TIPS

Wrap your shortcode in a div and give it an ID that you can use as a target when triggering your popup. For example, you can put the shortcode somewhere on your page (content, sidebar, etc) as follows:

<div id="popup" class="lightbox">[contact-form-7 id="1735" title="Contact form 1"]</div>

and the link that trigges the popup will look something like

<a href="#popup">Form</a>

You might have to use do_shortcode() in some cases, depending on where and how you add the shortcode.

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top