• 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

WP-Members Download Protect

The Download Protect plugin for WP-Members allows you to load files such as documents, PDFs, zip files, etc to a protected directory requiring the user to be logged in to access.

Files are uploaded to a separate folder within the main WP file upload folder structure and that folder is restricted from direct access. All files are served through a script-based process that prevents them from being accessed directly.  If a user is not logged in, they can be directed to an error page that requires them to log in.

Even if the direct link to the file within the file structure were known, the file cannot be accessed directly.

NEW: version 1.7.0 of the plugin now includes support for video.

This extension is available individually or with the WP-Members Pro Bundle.

Get the Plugin

WP-Members Download Protect is a premium plugin available in the store.

Best Value: this plugin is included in the WP-Members Pro Bundle package.

  • Sale! Pro Bundle

    Pro Bundle

    From $125.00 / year
    Select options This product has multiple variants. The options may be chosen on the product page
  • Download Protect

    Download Protect

    From $49.00 / year
    Select options This product has multiple variants. The options may be chosen on the product page

Documentation

  • Installation
  • License Key
  • Settings
  • Upload Files
  • Download Tracking
  • Shortcodes
  • Filter Hooks
  • WP CLI Commands
  • FAQs
  • Change Log
  • WP-Members User List

    The WP-Members User List plugin allows you to display lists of users on your site. Default parameters can be set in the plugin settings, but custom list parameters can be passed through the shortcode which allows you to set up multiple lists with different parameters.

    Features

    The User List plugin allows you to create user directories and lists that can be used in a variety of different ways. It can be used for searchable user directories but it can also be used to display groups of users for other purposes.  It is initiated by shortcode and each shortcode instance can have different settings, so you are not limited to just the defaults that you create in the plugin’s settings. There is a (very) basic demo on the WP-Members Demo Site.

    The output is also very flexible when using CSS. The demo also has some list instances that have completely custom output (the descriptions of how to implement those customizations are available on the support site).

    Note that you do need to have WP-Members installed and activated, but you do not need to be using content restriction.

    Get the Plugin

    User List is a premium plugin available in the store.

    Best Value: this plugin is included in the WP-Members Pro Bundle package.

    • Sale! Pro Bundle

      Pro Bundle

      From $125.00 / year
      Select options This product has multiple variants. The options may be chosen on the product page
    • User List

      User List

      From $49.00 / year
      Select options This product has multiple variants. The options may be chosen on the product page

    Documentation

  • Installation
  • Settings
  • Display the List
  • Profile Page
  • Front-end Editing
  • Stylesheets
  • Filter Hooks
  • Tips and Tricks
  • Change Log
  • Manage license
  •  

    Display form rows in columns

    Chad Butler · Oct 19, 2018 ·

    This tutorial will address the common question, “How do I layout the form in columns?”

    Let me say that this tutorial is one of those that is a “guideline,” not an exact science. That is due to the number of different variables that cannot be controlled.  So for best chance of success, I recommend that you start with the basic process exactly as in the example. Try to reproduce that first so that you understand what it is doing before moving on to something complicated.

    The following is a discussion of the the exact code snippets that I used in this demo (which also uses the code snippets for assigning placeholders to the fields and removing labels).

    Continue Reading →

    wpmem_user_has_access()

    Description

    Checks if a user has access to a given membership product.

    Parameters

    $membership
    (mixed) (required) The meta key of the membership being checked, or an array of membership meta keys.

    $user_id
    (integer) (optional) The user ID to check. If no user ID is passed, it will check for the currently logged in user.

    Return Value

    boolean (true|false) Returns true if the user has access, otherwise false.

    Example

    /**
     * This example checks if the currently logged in user has
     * access to the "my-membership" restriction. The 
     * result will be a true|false boolean.
     */
    $has_access = wpmem_user_has_access( 'my-membership' );
     
     
    /**
     * This example is similar to the above, but it checks a
     * specific user by user ID contained in $user_id.
     */
    $has_access = wpmem_user_has_access( 'my-membership', $user_id ); 

    Notes

    If checking multiple memberships, pass an array of the membership meta keys (slugs).  If the user has current access to any of the memberships, the function will return true.

    Changelog

    Introduced in version 3.2.0
    Version 3.2.3 reversed the order of arguments.

    Source

    wpmem_user_has_access() is located in /includes/api/api-users.php.

    wpmem_set_user_product()

    Description

    Sets user access for a given product. (As of plugin version 3.4.2, use wpmem_set_user_membership() instead)

    Parameters

    $product
    (string) (required) The meta key of the product to set access for.

    $user_id
    (integer) (optional) The user ID to assign access to. If no user ID is passed, it will set the product for the currently logged in user.

    $date
    (string|date|boolean) (optional) The user’s expiration date for the product in either MySQL date format (YYYY-MM-DD 00:00:00) or simply YYYY-MM-DD. Default value is false and the expiration will be set from the current date.

    Return Value

    boolean (true|false) Returns true if setting the product was successful.

    Examples

    // Basic usage of how the function is applied:
    wpmem_set_user_product( $product_meta, $user_id, $date );
    
    
    /*
     * The practical example below will set a default
     * membership for a user when they register. In this
     * example, it will set access for 'my_basic_product'.
     * In a real world application, get the slug for the
     * membership you want to set at registration from the
     * Membership > All Products table.
     *
     * The example uses the 'wpmem_post_register_data'
     * action to apply the membership at registration.
     * @see: https://rocketgeek.com/plugins/wp-members/docs/filter-hooks/wpmem_post_register_data/ 
     */
    add_action( 'wpmem_post_register_data', 'my_set_basic_product' );
    function my_set_basic_product( $fields ) {
        
        // Defaults.
        $product_meta = 'my_basic_product';
        $user_id = $fields['ID'];
        
        // Set product access.
        wpmem_set_user_product( $product_meta, $user_id );
    }

    Changelog

    • Introduced in version 3.2.3
    • Added $date argument in version 3.2.6
    • As of version 3.4.2, use wpmem_set_user_membership() instead.

    Source

    wpmem_set_user_product() is located in /includes/api/api-users.php.

    • « Go to Previous Page
    • Page 1
    • Interim pages omitted …
    • Page 23
    • Page 24
    • Page 25
    • Page 26
    • Page 27
    • Interim pages omitted …
    • 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