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

is_user_logged_in

How to hide posts completely

Chad Butler · Feb 10, 2015 ·

There are times when a site operator may wish to completely hide certain posts – either all posts that are blocked, posts of a certain category, or other possibilities.  While the main process that the plugin operates on is to show titles and excerpts on summary pages to drive users to conversion (registration), that is not a one-size-fits-all solution.

WP-Members 3.0 will begin to introduce certain administrative options to manage this process. But until then, here is a discussion of how to unload posts from display depending on criteria that you establish.  Continue Reading →

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 →

Blocking Content from Builder Plugins

Chad Butler · Jun 27, 2014 ·

WP-Members has always focused on content contained in the WordPress $content variable. More recently, the popularity of builder plugins such as Page Builder by SiteOrigin or Elegant Builder from Elegant Themes has raised the issue of blocking content that is not necessarily stored in the same manner.

Note: as of version 3.0.4, the priority of WP-Members filter hooked to the_content has been changed to accommodate builder plugins. The priority is now 99, so unless another plugin sets its priority at 100 or higher, WP-Members will come after it (which is what you want). I’ve left the information in this post intact as it may be useful for some applications, but for most users, it will be unnecessary.

The post focuses on the general approach to blocking content from these types of plugins and includes code snippets you can use for the two plugins mentioned above.  

Continue Reading →

Request additional data fields on a specific page

Chad Butler · Apr 20, 2014 ·

This particular example is a generic tutorial for requesting additional data fields in the registration form on a specific page. Since these are fields that do not show up in the regular registration form, we need to also present the data to logged in users to add this data.

While conceptually this is not an overly complicated process, the practical implementation has quite a few steps, so I will try to explain each step in the process while giving that particular code snippet being discussed at that point.Continue Reading →

Creating menus for different user roles

Chad Butler · Jan 13, 2014 ·

We’ve had some different tutorials on displaying menus based on login status – showing a different menu for logged in users vs. non-users.  I also put together a code snippet and a plugin extension to automate this process.  There’s even a tutorial on how to remove menu items based on login status.

This tutorial is an extension of those concepts to display different menus based not only on logged in status, but also a user’s role.  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