Layers Plugin Guide: Selling Your Extensions

Extension Development

Since: 1.0 Last Updated: for: 1.5 Time to Read: 4 minutes

Layers is a unique page/site builder & theme framework for WordPress. Extensions for Layers can provide additional functionality, widgets, post types and templates.  The following guidelines are tailored to commercial authord looking to submit official Layers WP Extensions to Envato’s CodeCanyon marketplace, which is the official marketplace for Layers products. Even if you plan to sell your plugin independently, we recommend using these guidelines as a checklist to ensure the easiest maintenance and best success for your product.

  • Layers Extensions must follow all standard CodeCanyon General File Preparation Guidelines on CodeCanyon.
  • The Layers WP theme should not be included in the extension zip file. Include a prominent link to the Layers WP download in the Item Description and documentation instead.
  • Item must have the following at the top of the description to help buyers know that the item works with Layers.


  • The main extension folder must have a lower-case name, prefixed by “layers-”, with hyphens to separate multiple words.  For example “layers-your-extension-name”.
  • The extension should follow a similar file and folder structure as the Layers theme framework itself as outlined in setup your plugin.
  • The main plugin file must begin with this safety measure:

  • Plugin files must use UTF-8 encoding
  • Plugins that hook into any WordPress or Layers filters or actions must use a PHP class to help keep the code organized, efficient and reusable. See Setup Your Plugin Class for a detailed walkthrough.
  • Including PHP files or libraries must be done using the require_once() method. See Layers Plugin Guide: Including Scripts, Styles & Helper Files.
  • Including scripts, hosted fonts or stylesheets must use wp_enqueue_style or wp_enqueue_script.  Those must be properly enqueued or registered in your plugin class. See Including Scripts, Styles & PHP for details.
  • You may not remove, hide or unregister  the Layers Dashboard, Layers Messenger or the Marketplace links
  • Defaults for pre-existing Layers customizer controls should be added via the layers_customizer_control_defaults hook.
  • New custom controls must be added to the Customizer via the layers_customizer_controls hook.
  • New custom sections must be added to the Customizer via the layers_customizer_sections hook.
  • Additional plugin options should be added via a Customizer panel and not a back-end options page wherever possible. This includes any color customization.
  • Core Layers options and widgets should not be modified or inaccessible with your plugin activated.
  • Layers Builder Widgets (widgets that are used in the Layers Builder pages that include specialized Layers controls) must extend the Layers_Widget class rather than the standard wp_widget.  This enables you to use helper functions within Layers to speed up widget creation.
  • Your Layers Builder Widget “classname” setting must be prefixed with “obox-layers-” to show the Layers badge on the widget.
  • if( class_exists( “Layers_Widget” ) ) must wrap your widgets to avoid conflict when a non-Layers theme is active.
  • When setting up a widget’s Design Bar, its components must be passed through a filter so that other developers can hook into it if needed.
  • If your widget queries objects, you must include options that allow sorting.
  • The general Layers HTML structure and classes must be retained in your custom builder widgets to ensure proper linkage with the framework and widget options.
  • You may inject custom classes or HTML but must not change the existing ones, especially the default CSS classes and the HTML element types used.
  • See the Layers Widget Guide for a detailed walkthrough.
  • Custom posts types are plugin territory and should be introduced through an extension, not a child theme.
  • Custom post types must use unique post type names, and have a condition check on the custom post type name to make absolutely sure the user doesn’t have a conflict / error on activation of your plugin.
  • You can still set your post type slug as something more generic.
  • When adding templates within a plugin, you must place all your custom template files into a templates sub-folder.
  • The plugin template folder location must be set by filtering the layers_template_locations hook.
  • Your child theme should not require the installation of a 3rd party plugin or library.  Include all dependencies in your own plugin.
  • When working with developer libraries like ACF or CMB2, they should be integrated into a custom plugin – do not ask your users to install development plugin suites to support features in your theme.
  • Layers extensions you did not create cannot be bundled in your product under CodeCanyon’s standard license structure. This includes StoreKit.
  • Layers Pro may be included in your child theme package under a developer/reseller license. For more information see the Layers Pro website.

Written  documentation is required to help buyers with installation, setup, and customization. This allows for printing and translation where needed.

View the Requirements on CodeCanyon

Check your theme with the Theme Check and Themeforest Check plugins and solve any issues relevant to YOUR theme (Layers issues are outside the review scope).