• 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

Understanding what happens during user login

Chad Butler · Jul 23, 2026 ·

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..

 

WP-Members’s login process incorporates a number of core WP functions, actions, and filters in order to provide as seamless an integration with other general WP plugins as possible. A lot has to happen to sign in a user, whether using WordPress alone, or along with WP-Members, so it can be confusing when things don’t seem to work correctly. This article breaks down a number of the processes that occur during this process to help you figure out where to look when things go wrong.

Continue Reading →

wpmem_post_memberships

Description

Filters the memberships required to access content (by post ID).

Replaces the wpmem_post_products filter.

Parameters

$post_memberships
(array)(required) The memberships assigned to the post.

$post_id
(integer)(optional) The post ID being filtered.

Usage

The following example shows how to use this filter hook to apply all posts in a category to a specific memberhship:

/**
 * You can have all posts in a category set to require a membership
 * by using the wpmem_post_memberships filter hook and WP's has_category().
 *
 * @see https://rocketgeek.com/plugins/wp-members/docs/filter-hooks/wpmem_post_memberships/
 * @see https://developer.wordpress.org/reference/functions/has_category/
 *
 * NOTE: This filter requires that you also have the category blocked (or at least
 * all posts in the category marked as blocked). The simplest way to do that is to
 * use a filter to make sure any post in the category is viewed as blocked.
 * @see https://rocketgeek.com/code-snippets/use-a-filter-to-block-a-category/
 */
add_filter( 'wpmem_post_memberships', function( $post_memberships, $post_id ) {
    
    // What is the category:
    $category = 'my-blocked-category-slug';
    
    // What is the required membership:
    $membership = 'my-membership';
    
    $has_category = has_category( $category, $post_id );
    if ( $has_category ) {
        return array( $membership );
    }
    return $post_memberships;
}, 10, 2  );

Changelog

  • Introduced in 3.3.5

Source

wpmem_post_memberships is located in inc/class-wp-members-products.php

WP-Members 3.5.6

Chad Butler · Feb 27, 2026 ·

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..

 

WP-Members 3.5.6 has been released with a security fix, a bug fix, and an improvement in the upgrade process.

Continue Reading →

WP-Members 3.5.5 Release Notes

Chad Butler · Dec 24, 2025 ·

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..

 

The WP-Members 3.5.5 release is primarily a feature update moving towards 3.6. There are also some bug fixes and security updates.

Continue Reading →

Add last name letter linkbar to User List

Chad Butler · Dec 8, 2025 ·

Continue Reading →
  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 8
  • Page 9
  • Page 10
  • Page 11
  • Page 12
  • Interim pages omitted …
  • Page 55
  • Go to Next Page »

Ready to get started?

Join Today!

© 2026 · 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