The page or ad listing you are trying to reach no longer exists or has expired

I have tested your code and it works just fine. The thing that I think you are missing is flushing the permalinks by going to WP Admin -> Settings -> Permalinks and click Save Changes.

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