[Solved] How to add wordpress username after url?


You can do

<?php
      if( get_current_user_id() ): // check if user is loggedin
         $current_user = wp_get_current_user();  //get user       
?>
<a href="https://direktoriku.com/shopping/?user=<?php echo $current_user->user_login;?>
   <button>Click me</button>
</a>
<?php endif;?>

1

solved How to add wordpress username after url?