Home/Tutorial/WordPress/LayersWP/How to Add Presets in LayersWP child Theme
How to Add Presets in LayersWP child Theme 2016-11-22T14:08:19+00:00

How to Add Presets in LayersWP child Theme

Presets:  Fully Configured Page Layout.

Step 1: 

Setup the Function:

Create a helper file such as presets.php, then include it in your functions.php using require_once():

 

Step 2:  

In your presets.php, start be defining your filter:

In the above example, we use layers_child_presets  as our custom function name, where child might be the name of your theme.

Step 3:  Sample Function

 

LINE 1:  Selecting the $layers_preset_layouts function and defining our own variable $layers_child_presets will allow us to pass our custom array into the Layers Presets so our screenshot and preset loader are visible under LAYERS → ADD NEW PAGE.

LINE 3: Set the first preset id.

LINE 4: Preset title.

LINE 5: Screenshot.

LINE 6: Screenshot_type.

LINE 7: JSON (You will get it from Layers Pages).

 

WordPress Theme Development For ThemeForest