Example code
Step 1
XTRA
Using WordPress action add content or PHP codes
In the following example you can see how to run your custom PHP codes after importing content from demo importer side.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* With this function you can run your PHP code after importing content in demo importer. | |
* | |
*/ | |
function codevz_after_import_content() { | |
// Run you custom PHP codes here. | |
} | |
add_action( 'codevz/importer/after_import_content', 'codevz_after_import_content' ); |
XTRA
How and where should I add this PHP codes?
Best solution is to add custom actions and filters in Child Theme functions.php file. But also you can create your own plugin and use this codes in your plugin.
No comment