• 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 » Search for "short code"

Search Results for: short code

wpmem_restricted_msg

Description

This filters the post restricted message dialog.

The default message string is “<p>This content is restricted to site members. If you are an existing user, please log in. New users may register below.</p>”

Note that the message text can be customized in the plugin’s dialogs tab. Also, if you are running a translated version of the plugin, this string may likely be translated. Keep those things in mind if using this hook to use str_replace on any of the dialog text since str_replace will only work on an exact match.

Usage

/**
 * @param string $str    The post restricted message with HTML.
 * @param string $msg    The raw message string.
 * @param string $before The 'before' HTML wrapper.
 * @param string $after  The 'after' HTML wrapper.
 */
add_filter( 'wpmem_restricted_msg', function( $str, $msg, $before, $after ) {

    /*
     * This example replaces the default <p> tag in the message
     * string with one containing a custom class.
     */
    
    $str = str_replace( '<p>', '<p class="my-custom-class">', $str );

    return $str;
});

wpmem_login_redirect

Description

Filter hook to redirect the user upon login.

Parameters

$redirect_to
(string)(required) The URL to redirect the user to.

$user_id
(integer)(optional) The user’s primary key ID.

Usage

add_filter( 'wpmem_login_redirect', function( $redirect_to, $user_id ) {
    
    // This will redirect to https://yourdomain.com/your-page/
    return home_url( '/your-page/' );

}, 10, 2 );

Notes

In plugin version 3.1.7, the WordPress login_redirect hook was added to login function. A filter for login_redirect would run on all logins across the site (whether from the WP-Members form or any other login form). A filter for wpmem_login_redirect would run only from the WP-Members login forms.

In order of operations, the login_redirect filter is applied first, then wpmem_login_redirect.

Changelog

  • Introduced in 2.7.7
  • $user_id argument added in 2.9.2
  • login_redirect added to login function in 3.1.7

Source

wpmem_login_redirect is located in includes/class-wp-members-user.php

Custom Email Content

There are several emails that may go to users.  These include:

  • New Registration – notifies the user that they have successfully registered.
  • Registration is Moderated – notifies the user that their registration is pending admin approval.
  • Registration is Moderated, User is Approved – notifies the user their pending registration is now approved.
  • Password Reset – email to send a new password to a user that forgot their password.
  • Admin Notification – email to admin notifying them of each newly registered user.
  • Email Signature – a footer or signature placed at the bottom of each of the above emails.

In addition to being able to set custom static content in these emails via the plugin’s admin panel, there are also filter hooks for each email sent out.  Filter hooks allow you to filter the email that is sent and also to add/subtract content from the email based on additional criteria.  The following filter hooks are available for email content:

  • wpmem_email_filter (powerful, all-encompassing filter for all but the admin notification email. see documentation for a list of all parameters the filter handles)
  • wpmem_email_newreg
  • wpmem_email_newmod
  • wpmem_email_appmod
  • wpmem_email_repass
  • wpmem_email_notify
  • wpmem_email_headers
  • wpmem_email_shortcodes
  • wpmem_notify_addr (changes the admin notification email address programmatically – can be used for different email addresses as well as multiple recipients)
  • wpmem_notify_filter (admin notification email filter equivalent to wpmem_email_filter)

Customizing Emails

Using the plugin’s administration panel, you may customize the content of the email messages that are sent by the plugin.

Note: only the emails relevant to your settings will display in the admin panel.  For example, if you are not moderating registrations, the email for an admin approved registration will not display since you do not use it.

Set a Custom Email Address

Custom Email Content

Email Format

Email Shortcodes

Email Troubleshooting

User Profile

In order to keep things on the front end of the site where things are wrapped in your theme (as opposed to the WP back-end), the plugin allows you to set an area for registered users to manage their settings, change their password, and also reset a forgotten password.

Setting this page up is exactly like setting up a registration page, covered in the section on Registration.

Creating a User Profile Area

The User Profile is a page where logged in users can update their profile information and change their password.  Also on this page, a logged out user can have a forgotten password reset.  Create a new page and place the following shortcode in the body:

[wpmem_profile]

Note: If you have set the plugin to block pages by default, you should set this page to be unblocked.

User Profile Location

Once you create the User Profile page as outlined above, it is available as a page in your WP installation to be added to menus in the same way you handle other pages.  This is dependent upon you and your theme, and whether you display all pages in a default menu.

In the plugin’s main options tab there is a setting for you to select the user profile page.  This tells the plugin where the page is and uses this to generate a “Forgot Password” link in the login forms. It is also used to generate the return link in the password reset.

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 47
  • Page 48
  • Page 49
  • Page 50
  • Page 51
  • Page 52
  • Go to Next Page »

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