Shortcode is displaying the content on top of the page [duplicate]

Shortcode Functions are executed as a filter before the content is echoed. Thus, the content you want to display instead of the shortcode has to be returned, not echoed.

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