Custom content before post content
You can check the post type of the current post via get_post_type
:
function theme_slug_filter_the_content( $content ) {
if( 'post' == get_post_type() ){
$custom_content="YOUR CONTENT GOES HERE";
return $custom_content . $content;
}
return $content;
}
add_filter( 'the_content', 'theme_slug_filter_the_content' );