WordPress Invitation Code - How To - Hide a File
Hiding a Downloadable File
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.
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
External File - To specify the URL of a file
2) Hiding Content
Use the shortcode
[cmicca_access_code] to show the Access Code box allowing the user to download the file.
In this example, the post will contain only the Access Code:
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.
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.
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.
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.
To place file's ID between opening and closing shortcodes. Attribute "file" should have "1" as a value in the opening shortcode.
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.
To place a file between opening and closing shortcodes using page editor. Attribute "file" should have "1" as a value in the opening shortcode.