Created
December 31, 2019 11:54
-
-
Save Pebblo/41ab894a2a3311657b83a1fda9903e61 to your computer and use it in GitHub Desktop.
Example of how to add a default description to EE events.
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 // Please do not add the opening PHP tag if you already have one | |
add_filter('default_content', 'tw_ee_default_post_content', 2, 10); | |
function tw_ee_default_post_content($post_content, $post){ | |
if(get_post_type($post) == 'espresso_events'){ | |
$post_content = 'Add your default EE post content here'; | |
} | |
return $post_content; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment