add action for displaying posts using a shortcode
You don’t need to hook into an action for a shortcode – adding the shortcode using add_shortcode() will make it run when you call the_content(). That said, your function for your shortcode needs to return your output, not just echo it outright. Otherwise you will find that your form will appear much earlier than you … Read more