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


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: