add_action() in switch statement

Not quite sure what you’re after – something like this?

<?php echo apply_filters( 'basey_page_title_news', __( '<h1>News</h1>', 'basey' ) ) ?>
<?php

    while ( have_posts() ) : the_post();
        switch ( true ) :
            case has_action( "basey_loop_single_$post->post_type" ) :
                do_action( "basey_loop_single_$post->post_type", $post );
                break;

            default : ?>

    <!-- your fallback code -->

<?php

        endswitch;
    endwhile;

?>

If a plugin/theme created a hook for a particular post type, it’d replace the default output.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)