Check to see if post is live before displaying the content

Your custom function show_post() uses get_page_by_slug() to retrieve the specified page.

Looking at source, it doesn’t look like get_page_by_slug() uses post_status. So, you’ll need to query $post->post_status within your show_post() function if you want to account for it in the function output:

<?php 
function show_post( $path ) {
    $post = get_page_by_path( $path ); 
    $content="";
    if ( 'publish' == $post->post_status ) {
        $content = apply_filters( 'the_content', $post->post_content ); 
    }
    echo $content;
} 
?>

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