Content Egg Pro Plugin
Home
Content Egg
Affiliate Egg
External Importer
Search…
Content Egg WP Plugin
Getting started
Installation
Upgrade Free to Pro
Automatic updates
Modules
General information
Affiliate modules
Coupon modules
Content modules
Feed modules
Deprecated modules
My network isn't listed
Affiliate Egg integration
Deeplink settings
Set Up Products
How to add products
Price comparison websites
Autoblogging
Fill tool
Products page
Deeplink settings
Updating products
Price update
Product list update
Why prices don't update
Out-of-stock products
Price history
Price alert
Price movers
Frontend
How content is displayed
Shortcode parameters
Variations/Group shortcodes
Featured images
Frontend Search
Translation
WooCommerce Integration
General information
Product synchronization
Attributes synchronization
WooCommerce and autoblogging
Integrations
Affiliate Egg Integration
Cashback Tracker Integration
External Importer integration
WooCommerce Integration
Customization
Localization
Custom templates
For developers
REST API
Compatibility with themes
FAQ
How to add custom logos for merchants
How to import from CSV data feeds
Nothing found while search
How to change the date format or the date is not being displayed
Powered By
GitBook
For developers
Custom templates
You can add to your theme unique templates for the Content Egg plugin.
Custom templates
Front search customization
Frontend Search
REST API
REST API
Access to data
1
add_action
(
'content_egg_save_data'
,
'my_function'
,
13
,
4
);
Copied!
Hook is called every time after saving/updating data of the Content Egg plugin.
Parameters:
$data
- (array) Data array.
$module_id
- (string) Module ID.
$post_id
- (int) Post ID.
$is_last_iteration
- (bool) Is this the last iteration or will there be other modules that need to save the data right now?
1
add_action
(
'cegg_autoblog_post_create'
,
'my_function'
,
10
,
1
);
Copied!
Hook is called every time after creating the post by autoblog
Parameters:
$post_id
- (int) Post ID.
The Content Egg data is stored in standard Custom fields of Wordpress. In your theme or plugin you can get an access to the raw data of each module:
1
get_post_meta
(
$post_id
,
'_cegg_data_'
.
$module_id
,
true
);
Copied!
The recommended way to get the Content Egg data, after processing for display on the site:
1
\
ContentEgg
\
application
\
components
\
ContentManager
::
getViewData
(
$module_id
,
$post_id
);
Copied!
Available filters
Templates for modules might be stored
in theme directory
. Thus you can create theme with the special number of Content Egg templates. And, maybe, you will want to disable some or all standard Content Egg templates. Use the filter to do this:
1
add_filter
(
'content_egg_module_templates'
,
'my_filter_function'
);
Copied!
The first parameter will be array of templates list, the second – module title.
For block templates:
1
add_filter
(
'content_egg_block_templates'
,
'my_filter_function'
);
Copied!
Also you can disable some modules:
1
add_filter
(
'content_egg_modules'
,
'my_filter_function'
);
Copied!
Use these features carefully, explain to the user why some standard plugin features are disabled.
If you are the author of a theme or a plugin, and you have any questions or proposes, please apply to our support.
Customization - Previous
Custom templates
Next - Customization
REST API
Last modified
5mo ago
Copy link
Contents
Custom templates
Front search customization
REST API
Access to data
Available filters