Want to include ad code after related post

I’m absolutely guessing here, but you may want to put your code between:

<?php if ( get_option('wap8_post_rel') == 'true' ) { locate_template( '/includes/relatedposts.php', true, true ); } ?> // these are your related posts

and

<?php comments_template( '', true ); ?> //these are the comments 

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