Summary: Please refer to the following guidelines before submitting Layers WP Child Theme items to ThemeForest. Layers is a unique page/site builder & theme framework for WordPress. Child themes for Layers can provide additional advanced styling, templating, and actions/filters.
Technical Requirements
- Layers Child Themes must follow all standard WordPress Theme submission requirements on ThemeForest.
- The LayersWP theme should not be included in the child theme zip file. Instead a prominent link to the LayersWP download should be displayed in the Item Description and the documentation.
- Child themes must include an index.php file or they will not be able to be uploaded to ThemeForest. If the child theme doesn't need to customise the parent theme's index.php, they should just call the parent's index.php file from their index.php file. For example, the index.php file should look like this:
<?php // load the parent index.php file require_once( get_template_directory() . '/index.php' );
- Item must have the following at the top of their description to help buyers know that the item works with Layers:
<a href="http://enva.to/2Hhv8"><img src="http://all-marketplaces.s3.amazonaws.com/growth/layers/landing-badge-small.png"></a>
- The child theme should follow a similar file / folder structure as the Layers theme framework itself as in the following example:
- Child Theme Folder /
- assets /
- preset-images/
- css /
- images /
- js /
- theme.js
- languages /
- partials /
- functions.php
- style.css
CSS & Styling
- CSS rules must be specific enough to override the CSS used by the parent (LayersWP). For more information on CSS Specificity see this article.
- Child Theme must de-queue and re-enqueue the parent stylesheets to ensure child stylesheets load in the proper order (child stylesheets last).
- Font icon libraries may be enqueued from a hosted source / CDN if available.
- Please Note: Google fonts are already enqueued in the Layers framework.
- Font icon libraries, if included in your theme, must be placed in a subdirectory of the child theme’s assets folder.
- Additional font styles and @font-face CSS must be kept in a separate “fonts.css” stylesheet.
- The “fonts.css” stylesheet must be enqueued as a dependant of the Layers theme framework’s font stylesheet to ensure it loads before the child stylesheet.
- Layers Customizer defaults must be setup in the functions.php to allow basic color, layout and font customization. See layers_customizer_control_defaults for detailed usage.
JavaScript
- Additional JavaScript files must be placed in the child theme’s “assets / js” subdirectory.
- Modifications to core Layers scripts (such as the slider) must not attempt to load a modified copy of the script over the core version. They must reference the script APIs and include the scripted adjustments within your child theme’s “theme.js” file.
PHP & Templates
- Including separate PHP files or libraries must be done using the “require_once()” method from within the child theme’s “functions.php” file.
- Any page templates added to the child theme must use the Layers framework HTML structure, classes, and functions for calling elements like sidebars (as per the default Layers page template).
- Child Themes must not modify the following elements in existing Layers templates:
- Do not change template heading types. Headings have been optimized for SEO purposes and are directly connected with framework typography styles.
- Do not swap out HTML elements or break away from the Layers framework structure (e.g. changing all <sections> to <div>). Adding HTML elements is okay.
- Do not remove default classes or function calls inside the element wrappers, as doing so may break framework functionality or settings. Adding classes or functions is okay.
- Do not use the “query_posts()” function to modify the default query.
- When registering new sidebars, you must not use simple numbers or generic ID values such as “sidebar”, “widget-area”, or “widgets”. Sidebar IDs must be lower-case and use hyphens to separate words.
- Custom widget areas must use the safety condition “is_active_sidebar” to ensure no naming conflict with other plugins.
- Child themes must not introduce any content related functionality, such as Custom Post Types, Custom Taxonomies, shortcodes, etc. These should be handled by a separate extension plugin, and may be packaged with your Child Theme and/or offered separately as an add-on.
Child themes may include additional Preset Layouts, in order to improve the performance of the Layout generator, all images used in your preset layouts can be added to the assets/preset-images/ folder.
Documentation Requirements
Written documentation is required to help buyers with installation, setup, and customization.
- Please refer to the ThemeForest General File Preparation Guidelines for instructions on how to format your help file(s).