Favicon not loading until cookies are accepted?

I figured out the issue. In my plugin I was calling an echo statement from a WP_Head function. This was causing the <head> tag to be immediately closed and rendered in the body. Any remaining code for the WP_Head was being output in the body, including the favicon <link> tags.

setcookie on WordPress Page Template

This fails because the init hook is far too early to call is_page_template. Conditionals such as this function use the main query to decide their value, but WordPress hasn’t created the main query yet. The earliest hook you can safely do this is template_redirect.

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