• 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
  • Blog
    • Basics
    • Tips and Tricks
    • Filters
    • Actions
    • Code Snippets
    • Shortcodes
    • Design
    • Release Announcements
  • Store
    • Cart
    • Checkout
  • Contact
  • Log In
  • Show Search
Hide Search
Home » Archives for wpdb

wpdb

Email users when a new post is published – opt-in/opt-out version

Chad Butler · Jun 9, 2013 ·

This code snippet is an extension of the email users when a new post is published snippet.  Like that snippet, this one comes from user requests.

The difference here is that we will only email users who have requested specifically to be notified of new posts, and we’ll allow them to opt-out of that process at a later date by updating their profile.  Continue Reading →

Validate a registration with a PIN

Chad Butler · Apr 16, 2013 ·

Here is a script idea you can use to validate a stored value that you might have for users (such as a PIN) against their registration data.  This example will assume that you only want to allow certain registrations for people who you already have data on (in this example, their name) and you want to validate that the user registering is that person.  This example will use PIN assigned to the user’s data that we have and the script will validate the PIN provided at registration or will halt registration. Continue Reading →

Email users when a new post is published

Chad Butler · Mar 19, 2013 ·

This tip is a request from a user.  I like user requests – that makes it easier to deliver the kind of tutorials users are looking for instead of things I just come up with on my own.

This particular tip will address how you can automatically send an email to all users when a post is published or updated. Continue Reading →

Add a database generated list of values to the registration form as username

Chad Butler · Aug 29, 2012 ·

This post will show you how to replace the username selection in the registration form with a dropdown list of choices generated from a database.  This is similar to what is described in this post except that in this version, we are using this as the username selector. Continue Reading →

Add a database generated list of values to the registration form

Chad Butler · Aug 27, 2012 ·

This sample code is an example of how to take a list of values from a database table and use it to generate a dropdown select option in your registration form.  You can get as involved or as simple as need be from this framework.

I will be giving an example that will take a list of names from a database table so that the user can select their name from the list. To make it a little more interesting (and functional), I will update the table when the user registers so that name will not show in the registration form in the future. Continue Reading →

Ready to get started?

Join Today!

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

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