Hello,
I’m using the following code to insert a “login” link with redirect js to the menu
add_action( 'generate_inside_navigation','generate_insert_into_navigation' );
function generate_insert_into_navigation(){
if (! is_user_logged_in())
{ ?>
<a href="/login/" onclick="window.location = '/login/?redirect_to='+window.location.href; return false;">Login</a>
<?php }
}
This works fine, but I would like to know if there’s an easy way to
1. move its position to the end of the menu?
2. add it to the off-canvas menu?
Thanks in advance!