How to prevent XSS attack in wordpress theme?

XSS generally would only occur through AJAX or form handling. Verify a referrer header is actually from your FQDN and/or require a captcha, providing pseudorandom input validation.

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