• 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 add_action

add_action

Redirect Blocked Content to a Log In Page

Chad Butler · Feb 3, 2015 ·

By default, the plugin automatically places a login form in place of blocked content if the user is not logged in.  But sometimes plugin users prefer to redirect a user to a log in page when they attempt to access a page or post with blocked content.

This can usually be accomplished with a custom function to check for the user’s login state, whether the content is to be blocked, and a redirect process.  Continue Reading →

Set user expiration to a fixed date

Chad Butler · Nov 3, 2014 ·

The PayPal Subscription Extension operates by setting a user’s expiration date to today + the subscription period. For example, if the subscription period is 1 year, the expiration date will be one year from now.

But what if you want all users to expire/renew on the same day of the year? Or if you would like to just set a hard date far out in the future?  Yes, there is a way you can do such things.

There is an action hook that comes just after the user’s expiration date is automatically set – wpmem_exp_after_set_exp.  Using this action, you can create a custom function to change the expiration date that is automatically set by the extension to whatever you want.  Here are three simple examples. Continue Reading →

Set user forum access when using bbPress with the PayPal subscription extension

Chad Butler · Nov 2, 2014 ·

When using WP-Members with bbPress and the WP-Members PayPal subscription extension, there are some additional considerations for your setup to integrate these plugins smoothly and restrict forum access for paid users who have a valid expiration date.  

Continue Reading →

Automatically clone theme menu location to display different menus based on login status

Chad Butler · Nov 21, 2013 ·

This article is provided free. Find out how you can get full access to premium content, including how-to articles and support forums, as well as priority email support and member exclusive plugin extensions..

 

One of the most common questions that I receive is how to display menu items based on login status.  Because there truly are several answers with multiple options, it an become a little confusing, even to more advanced users.  It really boils down to how to you want to construct your site and how do you want things to work?

I have provided different methods of doing this in the past, but that was often difficult for some users because you really needed to understand how to set up a child theme and do theme customizations appropriately.  That is not easily within reach of all users.

So I have put together a plugin extension to make this process more automatic.  Now you can handle everything through the WP Menus admin panel.  It will automatically clone any menu areas of your theme, thus providing you with the ability to serve different menus for those menu areas based on whether a user is logged in or not.

Read more about this extension here.

Site members can download this and other extensions here.

Generic Header Login as a Widget

Chad Butler · Oct 12, 2013 ·

Using the generic header login HTML as a starting point, I created a header login widget.  This can be used in themes that have a header widget area where the sidebar widget might not fit well.

Consider this a framework to start from.  The code for the form as well as the CSS for styling for form can be customized to fit your theme’s needs. I’ve added lots of comments in the code snippets so you can follow how it is being done. Continue Reading →

  • Page 1
  • Page 2
  • Page 3
  • Page 4
  • 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