Get page ID outside the loop, matching menu ID

Use get_queried_object_id() to get the ID regardless of what type of object it is- term, post, page.

There is also the get_queried_object() function, which will give you more details, but will have some structural differences depending on object type.

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