List of Available Shortcodes for WP-Members™

Shortcodes for email messages:

  • [blogname] – the Site Title you have specified under Settings > General
  • [username]
  • [password]
  • [reglink] – a link to the page the user registered on (useful to return a user directly to the content they registered to view)
  • [members-area] – the members area where, among other things, the user can change their random password to whatever they want

These shortcodes are only available in the admin notification email:

  • [email] – the user’s email address
  • [fields] – a list of any of the registration fields
  • [user-ip] – the user’s IP address when they registered
  • [activate-user] -a link to the user profile page so they can be activated (used if moderating registration)

Page Shortcodes:

These page shortcodes run various optional pages for the plugin:

  • [wp-members page="members-area"] – creates a page where a logged in user can update their registration information or change a password, and a logged out user can reset a forgotten password.
  • [wp-members page="register"] – creates a page specifically for registration.
  • [wp-members page="login"] – creates a page specifically for logging in.

Status Shortcodes:

The status shortcodes determine whether content should be shown based on the user’s login status.

  • [wp-members status="in"]Content to display if user is logged in[/wp-members]
  • [wp-members status="out"]Content to display if user is logged out[/wp-members]

45 Responses to List of Available Shortcodes for WP-Members™

  1. Willem-jan says:

    hi,

    i am allmost ready but when i changed the new options of the mail, i discoverd a security problem. as the owner of the site, i do not want to see with what password users subscribe. if i use the [fields] option, i see the password a user have chosen. i think this is not ment to be!

    greetings,

    • Chad says:

      In this instance, are you also using the new feature of user defined passwords by adding a password field to the registration fields?

      • Willem-jan says:

        Yes, but i now read that a part of that function is not working… i deleted the field.

        but is it something you change if the function is going to work?

        • Chad says:

          I believe that you misunderstood – it does work. However, based on the process flow, that feature cannot be used in conjunction with moderated registration at this time. But that doesn’t mean it doesn’t work.

          The fields shortcode currently puts all of the non-WP fields that are in the fields list into the body of the admin email. In the case of not using a user defined password, that would not be included. The values of any data that is included by the fields shortcode would be what is stored in the usermeta table, which the password is not. So, while it will include the password field name, there would be no value included. Did you find that to be the case?

          Regardless, in the next update, I’ll be adding a bypass so that the password field is skipped from this process.

  2. annabeøø says:

    I need som help,how do i get the inlog form to show in my website?im using wordpress.

  3. Bruce says:

    Hi
    This is a great plugin and all was working well, but now it has stopped sending automatic passwords on new member registrations. It collects the details and stores the new member but they are unable to login and I don’t receive an email advising of the new sign up.
    This is without me changing any settings (although I have recently updated WP-Members plugin)

    Can you help? Thank you

  4. nelson says:

    I put the [members-area] on the pages, and I couldnt find the html/css code for that, my questions is How can I edit the wording ” New Users Registration” and where is the html/css for that wording? Thanks

  5. nelson says:

    I also wondering if its possible to have a new different page just for members only? i mean, right now im using a templates, but i want to add 1 more page just for members only. thanks

    • Chad says:

      Any page or post can be blocked or unblocked. Review the User Guide and Quick Start Guide for more on this, but essentially, you should be determining whether you want posts and pages blocked or unblocked by default and setting this in the plugin options accordingly. Then any given post or page can be given the opposite setting as needed.

  6. arizcats says:

    Anyone know how to email everyone who has signed up and re-send them their passwords. I had the above version 2.7 error where the password email was not sent so several people are currently without a password.

    • Chad says:

      A Deactivation/Reactivation feature was added in 2.7.1, so the easiest way would be to upgrade to 2.7.1, apply the patch discussed here, then deactivate/reactivate any effected users. The reactivation process will send them a new password.

      Alternatively, if you are familiar with using MySQL directly, you could remove the “active” flag for all effected user IDs in the wp_usermeta table, then use the Users > WP-Members table to bulk activate all of those users (similar results as the above suggestion).

      • arizcats says:

        I did the above and can not find the activate/reactivate feature

        • Chad says:

          For any users that need a new password, go to the user profile and deactivate them. Then you can reactivate them individually (on the user profile page) or all at once (on the Users>WP-Members page). Reactivating them will generate and email a new password.

  7. sophie says:

    Hello Chad

    Thank you for this greaat plugin. These days I’m trying to replace the actual login form by a facebook login (eg using facebook connect plugin) but without giving up on WP Members. Meaning I have premium content accessible to members onlu (custom field block = true) but i would like this wp members protected content to be accessible through a facebook “like” and “login” so that we can extend our community of fans.

    Is Facebook login (or “you have to like our fan page to access those pages”) compatible with a WP members structure ?

    Kind regards
    Sophie

    • Chad says:

      That kind of depends on your definition of “compatible.” Social and OpenID type login structures are compatible in the sense that, if they work with WP and allow the user to gain a WP recognized login state, then WP-Members will also recognize that as a valid login.

      However, some of these plugins hook into the WordPress login form at wp-login.php to show buttons/links for alternate logins. Those features will not work – WP-Members has its own form so those are not just going to automatically show up.

      Additionally, these plugins generally add the user to the WP user list. If you are adding additional registration fields to the user registration process, you will not obtain this data from users the come in via a social login unless they update their data.

      • sophie says:

        Wow, thank you Chris for this rapid answer. Kind of a beginner so I’m going to look for an easy plugin to do that! by compatible I mean one that would allow FB login and like with already “block true” Wp members protected content

        Have a nice week end
        Sophie

      • Seanyp says:

        This is a great plugin. It seems to offer everything that I need however, how would I go about ensuring that a FB Login mechanism works with your plugin? Granted the FB Plugin does not include the custom fields that I will have. Can this be filled out on wp_member_area AFTER they have registered?

        • Chad says:

          That would probably work. Not sure on that specific plugin, but they all work generally the same – a user is created in WP via the social login mechanism. This does bypass the WP-Members registration process, but the plugin does recognize the login (as long as WP recognizes it, WP-Members should in most cases). So then additional registration fields would be available via the members area if they wanted to update info.

  8. jim28100 says:

    Hi Chad,

    I need to be able to change the title on the registration form which currently says ‘New Users Registration’. Basically swopping ‘Users’ for ‘Members’. I’ve read the reply you gave to Nelson 6/Feb/2012 with regards to copying the relevant function held in ‘wp-members-dialogs.php’ and amending it in a new file called ‘wp-members-pluggable.php’. However, I cannot find any reference to the file ‘wp-members-dialogs.php’ or and reference to the form title in any of the existing files?
    Has this option been superseded?

    Jim

    • Chad says:

      It’s in wp-members-dialogs.php. A couple of caveats – First, I WILL be deprecating the legacy forms. This will probably facilitate putting the CSS forms back into the original functions – basically, wpmem_inc_registration_NEW would revert to wpmem_inc_registration. If you run this as a pluggable function, you’ll need to know that if/when this happens, you’ll need to update your custom function accordingly. Also, you have to be aware that even if you create a new version of the function, you need to check updates for compatibility. wpmem_inc_registration_NEW is a pretty large function to have to maintain to change a single line.

      I don’t know your timeframe, but if you can wait for the next release, there will be a filter hook for the form. That will be wpmem_register_form. A preview of what this would look like to use this would be adding something like this to your functions.php file:

      add_filter( 'wpmem_register_form', 'my_reg_form_filter' );
      function my_reg_form_filter( $form )
      {
      	// the generated form comes in as $form.
      	// use str_replace to filter the form
      	$old  = 'New Users Registration';
      	$new  = 'New Members Registration';
      	$form = str_replace( $old, $new, $form );
      
      	// return the new result
      	return $form;
      }
  9. jim28100 says:

    Thanks for the reply.
    Chad. Any idea as to when the next release is coming out?

    Jim

  10. jim28100 says:

    Hi Chad,
    It would be useful to be able check to see if the plugin registration checkbox is set to ‘moderated’. I have a ‘moderated’ page redirection function, which should only be active when the client elects to moderate the registrations. They will be turning moderation off from time-to-time following seminars, exhibitions etc. It would be handy if I could set it as a conditional statement?

    Jim

    • Chad says:

      There is a constant for indicating registration is moderated – WPMEM_MOD_REG – which will be a value of 1 if it is.

      I’m not sure of when the next release will be out. Generally, I announce it on the blog when it’s ready. Sometimes (and this will likely be the case on this one, too) I release it as a beta release candidate first. These can be downloaded from the wordpress.org plugin repository, but are not indicated via the automatic upgrade process, so you’ll need to watch the blog or my twitter feed for the announcement.

  11. fouad says:

    hey i just installed the plugin but i cant find the “members area” and “register page” pages how can i find them?

    • Chad says:

      These are optional pages you would create using shortcodes. This is covered in the Users Guide, the Quick Start Guide, and the readme file included with the plugin.

  12. Björn says:

    Hi Chad,

    Im in need of some kind of ID for the user that I can use later as a customer number, either one custom from WP-Members or maybe just snatch the user_id from WP, can you please help me with some code to get that value?

    Thank you!

    • Chad says:

      Certainly there is the user_id from WP. You could use that, or you could apply it (and other data) to an algorithm to generate something. If you are doing something when the user is logged in, you can use get_currentuserinfo to get their user data. Some other helpful WP functions might be get_userdata and get_user_by.

  13. Sheri says:

    Hi Chad,
    I have problem with the reCaptcha part. I could not register new member when I turn-on the reCaptcha option. There has no information returned in the message box and no new member registered. It just a blank box and register data staying on the page! If I turned-off the reCaptcha option, everything works fine and register success shows in the box.

    Is there something I was missing to get this work?

    Sheri

  14. great plugin, i use at my blog. Very easy to use and powerfull result. Thanks somuch.

  15. Ryan says:

    Hi Chad, Great plugin!
    One small thing… I have a registration page with text on top and below form, when a user registers I get the dialog popping up in between text. How can I get the dialog to open on a new page?

    Regards,
    Ryan

    • Chad says:

      You can’t display it on a new page. But you could probably move its location on the page by using some CSS. The error messages are .wpmem_msg

      Or, if you are talking about the successful registration message, if you wanted that to go to a new page, you could set up a “success” page and use the wpmem_register_redirect action hook. That hook (and all the others) are described in the user manual found on http://butlerblog.com/wp-members

  16. Hi. We are building a news site for a client, and I would like to know if the “Notify Admin: Sends email to admin for each new registration?” can be set to a particular Administrator, or even an alternate role (we are managing the technical aspects of the site – widgets, plugins, etc.), but our client will be the one managing and maintaining user registrations and approvals. Thanks!

    • Chad says:

      Hi Terri – At present, the plugin sends notifications to the email address that is specified in the WordPress General Settings. There is not an option to specify this to a specific user or role, although that might be something that I add in the future. Also, if you are restricting the access of the client (for example, so that they cannot edit plugins), you will need to specify edit users capability for their role as the plugin only loads various admin features based on role capabilities.

  17. jim28100 says:

    Hi Chad,

    Firstly – Great plugin!
    Can you help with this one please? The client is experiencing a small problem with the moderated emails containing they users’ name and password details not getting though. I’m guessing these emails might be getting caught by their spam filters. More specifically, I’m wondering whether it is the special characters within the password that is causing the problem? Unfortunately, these are corporate companies where the user doesn’t have access to spam filters or the ability to define a whitelist. Therefore:

    – Is there a way of limiting the password to just alphanumeric rather than including special characters to see if that solves the problem?

    - Or is there a way where the site admin can see the user’s password so they can send on a copy of their details if they flag a problem and the admin has to activate them?

    - Lastly, a designated admin receives all of the activation emails and passes them on rather than them going directly to the user?

    Regards

    Jim

  18. albert says:

    Hello Chad! Great Plugin!

    I’m wondering if is possible to have 2 different fields checkbox, but able just to select one of those two, like 2 options that cannot be both at the same time, like for example Male or Female, you cannot be both, so if you click in one (male) you cannot click in the other one (female) I really need this option because I cannot use the dropdown menu option for this. I’ll appreciate a answer.

    THANKS!!

    • Chad says:

      Hi Albert – what you are asking for is actually a radio button group which the plugin does not currently support. It may at some point in the near future, though…

  19. Pat says:

    Hi Chad,
    Many thanks for this plugin. I’m using itnow on my site and really appreciate it!
    I have 2 questions about it :
    1. Is it possible to define a specific redirection page after login or logout?
    2. I began to translate the plugin for FR and I have one issue : the “Existing users Login” message which appears as the title of the login form (when not connected) is not changing even when I add the FR translation in the langage file. Is there something specific on this item as for the others, there is no issue at all.
    Many thanks.
    Pat

    • Chad says:

      Hi Pat – yes, you can specify a page to redirect both on login and logout. By default, the login puts the user on the page they were on when they logged in, and the logout drops the user on the home page. There are filter hooks to override these defaults. Both of these filters (and others) are described in the Users Guide found on http://butlerblog.com/wp-members. To use them, you will need to understand how to use WordPress filters (the filters in the plugin work the same as any other WordPress filter) using add_filter.

      For the translation, there is an issue with the new version and the .pot file included in the download and it is that one line. I corrected it to be Existing Users Login and the .pot file needs to be updated accordingly. If you update this in your .po, you should be fine.

Leave a Reply

Your email address will not be published. Required fields are marked *.
Comments are moderated. Please submit only once.

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>