Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am trying to make contact form 7 pop up in a thickbox modal window. I can either use do_shortcode or the shortcode but I'm not sure how to set it up. Can someone push me in the right direction?

From the Thickbox page, it looks like I should be using either inline Content, iFramed Content, or AJAX Content, but I'm not sure which one.

share|improve this question

closed as off-topic by birgire, Pieter Goosen, Johannes Pille, s_ha_dum Oct 3 at 16:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

    
I found that the PopPop! plugin works really well with CF7 in terms of compatibility with themes. –  Mosey Apr 4 '13 at 1:00

1 Answer 1

up vote 1 down vote accepted

A solution I can think of is creating an almost empty page template that contains the bare minimum header, body (your shortcode) and footer.

Create a page with this template and load iFramed.

Like:

<?php
/**
 * Template Name: Almost Empty Page for Thickbox
 */

// REPLACE THIS get_header WITH THE CONTENTS OF THE FILE header.php
// AND CLEAN UP EVERYTHING THAT'S NOT NEEDED
get_header(); 
?>
    <div id="container" class="one-column">
        <div id="content" role="main">
        <?php
            do_shortcode(); // YOUR SHORTCODE
        ?>
        </div>
    </div>
<?php 
// REPLACE THIS get_footer WITH THE CONTENTS OF THE FILE footer.php AND CLEAN UP
get_footer(); ?>
share|improve this answer
    
By "cleaned" header.php and footer.php, I am assuming I should create a new version and call it like: <?php get_header('thickbox'); ?>? –  Desi Jan 9 '13 at 1:17
    
I've edited the Answer. When I do this, I prefer to make it bundled in only one file, but, yes you could go the get_header way. –  brasofilo Jan 9 '13 at 1:21
    
I created cleaned up versions for header-thickbox.php, a footer-thickbox.php and called them from thickbox.php (the template in your example). However, when I do this, I get this error: Fatal error: Call to undefined function get_header() in thickbox.php on line 7 Any ideas where I could have gone wrong? –  Desi Jan 9 '13 at 1:30
    
I get the same error. –  Desi Jan 9 '13 at 1:38
    
Does the page loads independently? If you navigate to the permalink? Try to load it in a regular iframe.... –  brasofilo Jan 9 '13 at 1:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.