WordPress.org

Ready to get started?Download WordPress

Forums

display plugin in post (3 posts)

  1. imanewbe
    Member
    Posted 3 years ago #

    I have created a post and have added a plugin (contact form 7) into it. I am able to view the post and the plugin is displayed but I have added it to one of my pages using

    $post = get_post($id = 19, ARRAY_A);
    print $post['post_content'];

    but all this did was print the code ([contact-form 1 "Contact form 1"]) that was in the post not the contact form its self.

    How do I get the contact form to display?

  2. coopersita
    Member
    Posted 3 years ago #

    I don't know if this will work, but here it goes:

    <?php echo apply_filters('the_content', $post['post_content']); ?>
  3. imanewbe
    Member
    Posted 3 years ago #

    Thanks. That worked perfectly.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.