Example code
Step 1
XTRA
Using WordPress action add content or PHP codes
In the following example you can see how to add content or PHP codes after mobile and tablet header.
This file contains 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 add any content or php codes after mobile header. | |
*/ | |
function my_prefix_after_mobile_header() { | |
echo 'This is a custom content text.'; | |
} | |
add_action( 'codevz/after_header_4', 'my_prefix_after_mobile_header' ); |
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