Hook Adding content after title

Use in_the_loop() to know if you are currently in the loop of the main query.

function after_title($title) {
    if ( in_the_loop() && ( is_single() || is_page() || is_home() || is_category() ) ) {
        $write="AFTER TITLE";
        $title = $title.$write;
    }
    return $title;
}
add_filter( 'the_title', 'after_title' );