Title: unlocking content access with QR code
Last modified: July 23, 2021

---

# unlocking content access with QR code

 *  Resolved [digikal117](https://wordpress.org/support/users/digikal117/)
 * (@digikal117)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/unlocking-content-access-with-qr-code/)
 * I am looking to create a page in which each user will find many different collectible
   cards, but all will be locked and greyed out.
 * With specific QR code scans, users will be able to unlock those different cards,
   that become colored, and after being unlocked, can be opened and zoomed in.
 * Here’s a screenshot of an app from which I’m taking inspiration: [https://ibb.co/pvsrVWM](https://ibb.co/pvsrVWM)
 * Do you have an idea of a possible way to achieve this?
 * Thanks in advance!
    -  This topic was modified 4 years, 11 months ago by [digikal117](https://wordpress.org/support/users/digikal117/).
    -  This topic was modified 4 years, 11 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
      Reason: Moved to Fixing WordPress, this is not an Everything else WordPress
      topic

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/unlocking-content-access-with-qr-code/#post-14694255)
 * Assuming you do not wish to build a similar mobile app and want such functionality
   for your hosted WP website, you could build a link into the QR which contains
   a certain query string your site will recognize as authorization to unlock card
   images. However, this will not be very secure. The link and query string could
   be easily extracted from the QR. People could then easily share the plain text
   link and short circuit the need to scan the QR. At issue is, unlike mobile apps,
   web pages cannot access phone hardware like cameras. All data has to come to 
   your server via HTTP protocol.
 * When the PHP code on the page the link leads to sees the correct query string,
   it simply serves unlocked content instead of locked.
 *  Thread Starter [digikal117](https://wordpress.org/support/users/digikal117/)
 * (@digikal117)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/unlocking-content-access-with-qr-code/#post-14694296)
 * Thank you for your reply. It was quite enlightening.
    So, once we’re not using
   QR code on a website, which method would you recommend so that the admin could
   manually control the available content for the users, on each of their account
   pages?
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/unlocking-content-access-with-qr-code/#post-14697005)
 * You could do it by requiring registration and login to see protected content.
   That’s essentially how the URL from the “Link to the page you need help with:”
   field of the new forum topic form works. You didn’t use it here, but if you did,
   it would appear below your OP only to logged in members. If not logged in, you
   would not see this URL. For an example where the field was used, see [https://wordpress.org/support/topic/unable-to-access-website-following-migration/](https://wordpress.org/support/topic/unable-to-access-website-following-migration/)
 * Similar logic for an entire page as for a single field. Template code for the
   page could look something like:
 *     ```
       if ( is_user_logged_in()) {
          // serve colored, zoomable images
       } else {
          // serve small B&W images
       }
       ```
   
 * Your site would be configured to require admins to create users on request via
   contact form or similar messaging.
 * Or you could allow open registration and manage content by user role. The default
   subscriber role might only see B&W images. An added “member” role could be assigned
   by admins which allow access to full color images. There are a few membership
   types of plugins that would allow you to easily do this.
    [https://wordpress.org/plugins/search/membership/](https://wordpress.org/plugins/search/membership/)
 *  Thread Starter [digikal117](https://wordpress.org/support/users/digikal117/)
 * (@digikal117)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/unlocking-content-access-with-qr-code/#post-14701589)
 * Thank you for your reply!
    I guess I’m now visualizing a way of making it work.
   Have a good week!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘unlocking content access with QR code’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [digikal117](https://wordpress.org/support/users/digikal117/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/unlocking-content-access-with-qr-code/#post-14701589)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
