WordPress Invitation Code - How To - Hide a File


Hiding a Downloadable File

Back to User Guide

What Is This Feature

With WordPress Invitation Code plugin it's possible to hide a file, meaning the user will have to input the code to be able to download it.

In the example below, entering the code triggers the download.

Using invitation code for downloading restricted file - Invitation Code Registration for WordPress
Using invitation code for downloading restricted file

Hiding File

Two steps are necessary:

1) Code Must Have Specific Sharing Type

When creating the code, ensure its sharing type is either File or External File.

  • File - To upload a file

    Choosing file content type for restricting - WordPress Content Restriction
    Choosing file content type for restricting
  • External File - To specify the URL of a file

    Choosing external link type for restricting - Private Content WordPress Plugin
    Choosing external link type for restricting

2) Hiding Content

Use the shortcode  [cmicca_access_code]  to show the Access Code box allowing the user to download the file.

Example

In this example, the post will contain only the Access Code:

Placing a shortcode to display a code box - Restrict Content Plugin
Placing a shortcode to display a code box

Multiple Download

This feature is available since the version 1.3.10.

There is a way to create one code for accessing to all files.

While creating the code, when you choose File Upload or File Link you can see there the checkbox Allow to multiple file download. When you check it don't choose the file for uploading and don't put a link for a file - these fields must be empty.

Enabling multiple file download option - WordPress Register with Invitation Code
Enabling multiple file download option

How to use it: when the code is created, you can place a box with accessing the code on any page using the shortcode in a few different ways.

First way

To use the shortcode [cmicca_access_code] with an attribute file="ID", where ID is ID of attached file. There also must be a closing shortcode. Note: between opening and closing shortcodes mustn't be anything.

Example:

Adding file ID to the shortcode - Portal WordPress Plugin Private Content Per User
Adding file ID to the shortcode

TIP: Where to find file's ID?

When you upload the file to your Media Library, you can open this file there and find it's ID in the link as shown on the screenshow below.

How to find file ID - Members Plugin Restrict Content
How to find file ID

Second way

To place file's ID between opening and closing shortcodes. Attribute "file" should have "1" as a value in the opening shortcode.

Example:

Adding ID between open and close shortcodes - Invitation Code Registration for WordPress
Adding ID between open and close shortcodes

Third way

To place a URL-link to the file between opening and closing shortcodes. Attribute "file" should have "1" as a value in the opening shortcode.

Example: 

Adding file link to the shortcode - WordPress Content Restriction
Adding file link to the shortcode

Fourth way

To place a file between opening and closing shortcodes using page editor. Attribute "file" should have "1" as a value in the opening shortcode.

Example:

Adding file between shortcodes - Private Content WordPress Plugin
Adding file between shortcodes

More information about the WordPress Invitation Code Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.