Template Tag “template_directory” pulling wrong path

To get the exact path of image which is placed in http://example.com/wp-content/themes/theme_name/images/pic.jpg in your theme.

All you have to use below code:

  1. To show image
<img src="https://wordpress.stackexchange.com/questions/29921/<?php bloginfo("template_url'); ?>/images/pic.jpg" />

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