• Skip to primary navigation
  • Skip to main content

RocketGeek

Home of WP-Members, The Original WordPress Membership Plugin

  • WordPress Plugins
    • WP-Members
      • FAQs
      • Quick Start
      • Documentation
      • Extensions
    • Advanced Options
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Download Protect
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Invite Codes
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • MailChimp Integration
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • PayPal Subscriptions
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Salesforce Web-to-Lead
    • Security
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Text Editor
      • Purchase the Plugin
      • Get the Pro Bundle
    • User List
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • User Tracking
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Memberships for WooCommerce
    • WordPass
  • Store
    • Cart
    • Checkout
  • Blog
    • Basics [Free]
    • Tips and Tricks
    • Filters
    • Actions
    • Code Snippets
    • Shortcodes
    • Design
    • Release Announcements
  • Contact
  • Sign In
  • Show Search
Hide Search
Home » Filters » Make MailChimp subscribe field a hidden field in the WP-Members registration form

Make MailChimp subscribe field a hidden field in the WP-Members registration form

Chad Butler · Mar 11, 2015 ·

Suppose you are using the WP-Members registration form essentially as an opt-in to your MailChimp list.  Essentially, you want anyone who fills out the form to be added to the MailChimp opt-in process.

This requires you to have the MailChimp extension installed and a subscribe field set up and configured.  This filter will take that field and make it a hidden field, essentially triggering the MailChimp opt-in process for all users.

This article is only available to WP-Members Support Subscribers. If you have an existing subscription, please login below. If you do not have a current support subscription, you can purchase a support subscription here.

Already a Member? Log In Here
   
Forgot password? Click here to reset

To gain full access to WP-Members premium content, a current support subscription is required. You can purchase an annual support subscription for as little as $59, which provides you with access to priority support, a customer support forum, access to code snippets, and more.

Why wait? Choose your subscription option here.

[
Why join?]

Filters, Tips and Tricks filters, mailchimp, wpmem_register_form_rows

Welcome to RocketGeek Interactive › Forums › Make MailChimp subscribe field a hidden field in the WP-Members registration form

Tagged: filters, mailchimp, wpmem_register_form_rows

  • This topic has 6 replies, 3 voices, and was last updated 2 years, 10 months ago by Chad Butler.
Viewing 3 reply threads
  • Author
    Posts
    • March 11, 2015 at 2:36 pm #7384
      Chad Butler
      Keymaster

      Suppose you are using the WP-Members registration form essentially as an opt-in to your MailChimp list.  Essentially, you want anyone who fills out th
      [See the full post at: Make MailChimp subscribe field a hidden field in the WP-Members registration form]

    • October 10, 2017 at 8:44 pm #13699
      stephenlee
      Participant

      I’m getting an error on this code snippet:

      The snippet has been deactivated due to an error on line 4:
      syntax error, unexpected ‘    ‘ (T_STRING)

      (I’m using the Code Snippets plugin)

      • This reply was modified 3 years, 4 months ago by stephenlee.
      • October 12, 2017 at 5:00 pm #13704
        Chad Butler
        Keymaster

        There aren’t any errors in the code snippet as written. If you’re copy/pasting, double check that you’re getting single quotes for all the quotes and not “curly” quotes.

        It may be difficult to notice the difference,
        but they should look like this: '
        And not this: ‘
        nor this: ’

        If they are the “curly” kind, then the encoding was transposed in the copy/paste process (which can depend on the platform and tools used). Best thing to do in that case is simply re-type them so they are the correct encoded character.

        • This reply was modified 3 years, 4 months ago by Chad Butler.
        • This reply was modified 3 years, 4 months ago by Chad Butler.
    • October 12, 2017 at 5:11 pm #13707
      stephenlee
      Participant

      Thanks Chad!

      • October 12, 2017 at 5:20 pm #13708
        Chad Butler
        Keymaster

        No problem! Hope it helps you track down the issue.

    • April 23, 2018 at 9:06 am #14611
      Paul Ryan
      Participant

      Chad

      I have several functions.php files, which is the correct one to put this snippet in?

      Paul

      Never mind I hae found the correct one and the script works a treat 🙂

      • This reply was modified 2 years, 10 months ago by Paul Ryan.
      • April 23, 2018 at 1:22 pm #14613
        Chad Butler
        Keymaster

        Glad you found it!

        Just for reference (for you or anyone else reading this later), here are some helpful articles on the site:

        When mentioning “functions.php” – it generally means the one in your theme folder:
        https://rocketgeek.com/basics/the-functions-php-file/

        Ideally, your active theme (and thus, the functions.php being used for custom code snippets) would be a child theme:
        https://rocketgeek.com/basics/create-a-child-theme/

        Some people choose to create a custom plugin file to hold their custom code snippets. This makes them independent of your theme (i.e. if you change themes, they still will be loaded):
        https://rocketgeek.com/basics/create-a-custom-functions-file/

        Some general information on using code snippets from the site:
        https://rocketgeek.com/basics/using-code-snippets-from-the-site/

  • Author
    Posts
Viewing 3 reply threads
  • You must be logged in to reply to this topic.
Log In

Ready to get started?

Join Today!

© 2021 · butlerblog.com · RocketGeek is built using WordPress, WP-Members, and the Genesis Framework

  • butlerblog.com
  • WP-Members Support Subscription
  • Terms of Service
  • Refund Policy