kreamweb
2/22/2013 - 6:07 AM

[Wordpress] - How use a filter in wordpress, in this case add a custom content before the content of post

[Wordpress] - How use a filter in wordpress, in this case add a custom content before the content of post

<?php
function theme_slug_filter_the_content( $content ) {
    $custom_content = 'YOUR CONTENT GOES HERE';
    $custom_content .= $content;
    return $custom_content;
}
add_filter( 'the_content', 'theme_slug_filter_the_content' );
?>