Custom templates
You can create your own templates for modules and blocks.
Never edit default templates, because you will lost all the changes after plugin updating.
Place your custom templates for module in one of the directories:
wp-content/content-egg-templates/ModuleName
wp-content/themes/your_theme/content-egg-templates/ModuleName
wp-content/your_subsidiary_theme/content-egg-templates/ModuleName
File names of module templates always should begin with the prefix
data_
, for example:data_simple.php
The template code should start with php-comment, where you set name of the template, for example:
/*
Name: My template
*/
Take as the basis the standard module template, for example:
wp-content/plugins/content-egg/application/modules/AdmitadProducts/templates\data_grid.php
You also will need files in directories:
wp-content/plugins/content-egg/application/templates
Here, common parts of the templates are stored, which are connected through construction:
$this->renderPartial('grid');
You can print all available module data:
<?php echo '<pre>'; print_r($items); exit;
Plugin will automatically find and connect your custom templates. They will have a label
[user]
in the title and prefix custom/
in the template id.
Place your custom templates for blocks (common block shortcodes) in one of the directories:
wp-content/content-egg-templates
wp-content/themes/your_theme/content-egg-templates
wp-content/your_subsidiary_theme/content-egg-templates
The names of templates files for blocks should always start with the prefix
block_
, for example:block_offers_list.php
Take as the basis the standard module template, for example:
wp-content/plugins/content-egg/templates
Make sure that your editor uses the UTF-8 encoding when editing the files.
Last modified 3yr ago