Skip to content
Help Center
  • Pricing
  • ProductsExpand
    • Premium BundlesGet all the tools you need in one bundle
    • Kadence ThemeLightning-fast performance theme for modern websites
    • Kadence BlocksDrop in ready designs with advanced controls for pixel perfect websites
    • Kadence Shop KitCreate a more effective WooCommerce shopping experience
    • Kadence ConversionsBoost sales and build engaged audiences with popups and banners
    • Kadence InsightsEasily create A/B tests. Optimize your pages to drive higher conversions.
    • View All Products
  • AI Starter Templates
  • Blog
  • SupportExpand
    • Help CenterProduct Questions? Not sure how to do something? Start here
    • Support TicketsNeed help? We love to help our customers
    • About usCrafted with love in Missoula, Montana
    • Contact usPre Sale Questions? Need help purchasing?
Account Account
Get Kadence
Kadence Pattern Hub
  • Features
  • Use Cases
  • HelpExpand
    • Documentation
    • Facebook Group
    • Submit a Ticket
    • Feature Requests
    • Changelog
Help Center
Kadence Pattern Hub

Pattern Hub

  • How to create your own Pattern Hub.
  • How to Generate Preview Thumbnails
  • Creating Categories and Search Terms
  • How to set the order of Patten Items
  • How to remove specific Access Keys

Selling Access

  • How to Sell Access Keys (Woocommerce)
  • How to Sell Access Keys (SureCart)
  • How to offer free items and show premium items
  • How to sell keys from one site for libraries hosted on another.

Advanced Access Keys

  • How to limit access keys to specific collections
  • How to limit an access key to a specific site
  • Home
  • Knowledge Base
  • Kadence Pattern Hub
  • Kadence Cloud
  • Advanced Access Keys

How to limit an access key to a specific site

Using the Code Snippet plugin you can filter the access key verification check to make sure access is only given to a specific site.

Add a PHP snippet with the following code, just changing your ACCESS_KEY and WEBSITE.COM with the key you want to limit and the site you want to limit it to.

/**
 * Checks for specific key and makes sure that key only works on a specific site.
 *
 * @param Boolean $access true or false based on access.
 * @param String $key the access key.
 * @param WP_REST_Request $request full details about the request.
 * @return Boolean based on if access should be granted.
 */
function custom_kadence_cloud_access_filter( $access, $key, $request ) {
    if ('ACCESS_KEY' === $key ) {
        $site = preg_replace("(^https?://)", "", $request->get_param( 'site' ) );
        if ( $site && 'WEBSITE.COM' === $site ) {
            return true;
        } else {
            return false;
        }
    }
    return $access;
}
add_filter( 'kadence_cloud_rest_request_access', 'custom_kadence_cloud_access_filter', 10, 3 );
How to limit access keys to specific collections
  • Pricing
  • Products
    • Premium BundlesGet all the tools you need in one bundle
    • Kadence ThemeLightning-fast performance theme for modern websites
    • Kadence BlocksDrop in ready designs with advanced controls for pixel perfect websites
    • Kadence Shop KitCreate a more effective WooCommerce shopping experience
    • Kadence ConversionsBoost sales and build engaged audiences with popups and banners
    • Kadence InsightsEasily create A/B tests. Optimize your pages to drive higher conversions.
    • View All Products
  • AI Starter Templates
  • Blog
  • Support
    • Help CenterProduct Questions? Not sure how to do something? Start here
    • Support TicketsNeed help? We love to help our customers
    • About usCrafted with love in Missoula, Montana
    • Contact usPre Sale Questions? Need help purchasing?
Account Login
  • Features
  • Use Cases
  • HelpExpand
    • Documentation
    • Facebook Group
    • Submit a Ticket
    • Feature Requests
    • Changelog