using the_permalink to echo an href into a

the_permalink() prints url immediately and returns nothing, you should use get_the_permalink() function, which returns current post url.

Leave a Comment

tech