Shortcode to log user into current URL

I’m trying to create a shortcode to log the user into the current URL however it doesn’t appear to be successful. Does anyone know how accomplish this?

Here is the code that I attempted:

<?php echo '<a href="'.wp_login_url( get_permalink() );.'" title="Login">Login</a>' ?>

This is different from prior questions because it relates to a shortcode which has special requirements as opposed to direct PHP.

Read more here: Shortcode to log user into current URL

Leave a Reply

Your email address will not be published. Required fields are marked *