do_shortcode not working outside of the_content
-
I am creating a custom theme.
I need to use the shortcode for the email petition outside ofthe_content();
<?php echo do_shortcode('[emailpetition id="1"]'); ?>
When I do this, the petition appears normal. However when the user submits the form, the page is refreshed and the user is not added to the list.
When I use the shortcode in the content editor, everything works fine.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘do_shortcode not working outside of the_content’ is closed to new replies.