Hooks Editor outputs only HTML


I installed Hooks Editor plugin and try to use PHP code in it.
I want some text to display only in single post page, so I wrote in rtp_hook_end_post_content:

if( is_single () ) {  
echo "some text";  

But I have got HTML output of the whole line (like text: if( is_single () ) { echo “some text”; }) on my homepage and every single page.


Hello Irina,

It seems you have not added php opening <?php and closing ?> tag. Try to use following code in same hook,

<?php if ( is_single () ) { echo "some text"; } ?>