How can I call plugin function from a custom template?

As long as the plugin is active, the function will work perfectly fine from any template.

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