As a proof of concept, I’d like to create a simple plugin that loads some content, say “hello world” just after the_content on the home page only. How can I do this from a plugin?
1 Answer
You mean a filter and a check for is_home()
?
add_filter( 'the_content', 'wpse6034_the_content' );
function wpse6034_the_content( $content )
{
if ( is_home() ) {
$content .= '<p>Hello World!</p>';
}
return $content;
}