Last active
August 29, 2015 13:57
-
-
Save WP-Panda/9875797 to your computer and use it in GitHub Desktop.
Default text in content
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 | |
function add_default_text_in_before_content() { | |
global $post; | |
$content = $post->post_content; | |
return 'My default text'.$content; | |
} | |
add_filter('the_content', 'add_default_text_in_before_content'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment