shortcode inside post called by ID does not render as expected

See this answer: How to get shortcode to work inside a foreach loop called within a shortcode?

You’ll likely want apply_filters( 'the_content', $footer_post->post_content )

And so, in your case:

$footer_content = apply_filters( 'the_content', $footer_post->post_content );
echo $footer_content;

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