Viewing 5 replies - 1 through 5 (of 5 total)
  • How can I add the contact form to a WordPress template manually rather than use shortcode in a page?

    Use this code:

    <?php
    if ( isset($si_contact_form) )  {
     echo $si_contact_form->si_contact_form_short_code( array( 'form' => '1' ) );
    }
    ?>

    Be sure to set the correct form number for example, for form 2 you have to set: ‘form’ =>’2′

    This may work also:
    <php? echo do_shortcode('[si-contact-form form="1"]'); ?>

    If it is a non WordPress PHP site you can use the Fast Secure Contact Form PHP version

    Thread Starter AWB Collier

    (@puddy127)

    Hello,

    Thanks for the quick response! I have tried both code snipets and it wont work. My form does load (it is #1) when I place the standard code in the page and publish it, it just wont work in the template. Is there something I am missing, or else I need to do?

    Thanks in advance,

    Change the #1 to the number of the form you want.

    You might try contacting your theme author for support trying to get code working in it.

    Thread Starter AWB Collier

    (@puddy127)

    Hi, I got it to work. It wasn’t the wrong number. The trick was to make the php think it was working in the content of a post/page as a filter. This is what worked:

    <?php echo apply_filters('the_content','[si-contact-form form="1"]');?>

    Thanks!

    Good find!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add FSCF to website but on a php page’ is closed to new replies.