How to use the "do_shortcode" to display this?

2 replies
Hi, i'm using wordpress. I combined contact form 7 with a lightbox to make a pop-up contact form. However I want to add the form to the top right of the homepage (above the menu bar). When ever i paste the double short code (contact form 7 and lightbox) in a post or page it works like a charm, but when i add it above the homepage menu only the code shows.

I heard i can do this using a do_shortcode. Do i need to add this code to the header.php file or what am i to do if anyone knows.

Thanks.
#display #doshortcode
  • Profile picture of the author vrtechnologies
    Like this way echo do_shortcode('[gallery]');
    {{ DiscussionBoard.errors[8042638].message }}
    • Profile picture of the author RobinInTexas
      gallery won't work.

      Code:
      <?php echo do_shortcode( '[contact-form-7 id="1234" title="Contact form 1"]' ); ?>
      FAQ | Contact Form 7
      Signature

      Robin



      ...Even if you're on the right track, you'll get run over if you just set there.
      {{ DiscussionBoard.errors[8047614].message }}

Trending Topics