• Resolved jasonwaltman

    (@jasonwaltman)


    My website hosts a WordPress blog and other pages that are not managed by WordPress. My contact page is not a WordPress page, but I would like to include a “Add me to your mailing list” checkbox here. Adding the checkbox was no problem, but I’d like to use the MailPoet API to automatically add an email to a list if this checkbox is checked and a message is sent.

    I think I can do everything I need with the API docs found here, but I can’t initialize MailPoet on a non-WordPress page (class_exists(\MailPoet\API\API::class) is FALSE).

    The class does exist if executed on a page on my blog, but is there a way to make the MailPoet API available on a non-WordPress page?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support kellymetal a11n

    (@kellymetal)

    Hi there @jasonwaltman,

    As MailPoet is built as a plugin for WordPress, there is no built-in functionality for running it on a non-WordPress page/site.

    The best option would likely be to create a form within MailPoet, and then use the iframe option to embed it in your non-WordPress page. You can find the iframe code to copy in the “Form Placement” section of the form editor. There’s more information about this here:
    https://kb.mailpoet.com/article/297-create-a-form-with-our-new-editor#placement

    Please let me know if you have any questions.

    Thread Starter jasonwaltman

    (@jasonwaltman)

    Thanks for the reply, @kellymetal!

    I assumed this would be the answer–just wasn’t sure if there was a way to initialize the API or load the WordPress plugin architecture on a website that has WordPress, but just isn’t being used on the page in question.

    I can’t use an iframe form in this case since the contact page’s primary function is to send an email (I was hoping to create something like the MailPoet checkbox that can be added to a WordPress comment). But this would be a good idea if I just wanted another signup form somewhere.

    Maybe I can re-create the page in WordPress and use htaccess to make the page look like it’s outside of the blog. For now, I’ve added the checkbox and, if checked, a note is added to the message to let me know I should add the user manually to my MailPoet newsletter list.

    Thanks again!

    Plugin Support kellymetal a11n

    (@kellymetal)

    Hi there @jasonwaltman,

    For now, I’ve added the checkbox and, if checked, a note is added to the message to let me know I should add the user manually to my MailPoet newsletter list.
    Thanks again!

    I’m glad to hear that you’ve found a manual solution for now. : )

    I’m going to mark this as resolved, but if you have any other questions, please feel free to open a new thread. Take care, and have a wonderful day!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘MailPoet API on non-WordPress page’ is closed to new replies.