Within 'the loop' of wordpress, you can simply use echo get_permalink()
, so without arguments. Alternatively, the_permalink()
is an equivalent that echoes this automatically.
Your code would then become:
<a href="<?php the_permalink(); ?>"> ... </a>