Function causes edit_post_link to link to the wrong post

Use the function wp_reset_postdata() after looping posts.I think this will solve your problem …

Note : if you use setup_postdata() you do need to wp_reset_postdata() afterwards.

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