Viewing 1 replies (of 1 total)
  • Plugin Author philbuchanan

    (@philbuchanan)

    You only need to call the do_shortcode() function once. You can put your entire shortcode block into a single PHP variable and pass that into the do_shortcode() function.

    The other issue you have is that you are mixing single and double quotes. The si-contact-form shortcode uses single quotes where it should use double quotes instead.

    Something like this should work:

    <?php
    $content = '[accordion clicktoclose="true"][accordion-item title="Click for Quick Contact Form!"][si-contact-form form="2"][/accordion-item][/accordion]';
    echo do_shortcode($content);
    ?>
Viewing 1 replies (of 1 total)

The topic ‘Hard Coding the Shortcode’ is closed to new replies.