Shortcode content output but not in correct place
The problem is that in 99% of cases, the_*() functions will echo out the content. If you’re assigning them you would need to use get_*() functions. In your case you’re echoing twice, once at the beginning of the link and again with the_*() function in the attribute and between the opening and closing tags. It … Read more