Insert Current URL into MailTo link in wordpress
You are overkilling the idea of the query to get the url. The simplest way and best way at the same time is: <?php // get_the_ID() will return the current’s post id // get_the_permalink() will return the current url $current_url = get_the_permalink(get_the_ID()); ?> That function will not echo, but rather return/get the permalink url for … Read more