I’m trying to add a code to the_content() function. I tried the following
function add_something($content) {
echo "test";
}
add_filter( 'the_content', 'add_something', 6);
After adding the filter my posts return just the echo test without the content. How can I execute my custom code without omitting the content?
I would surmise you need something like that (if it’s indeed a filter callback):
Seems what the docs say:
http://wordpress.org/support/topic/add-something-to-the_content