• Resolved jgessentials

    (@jgessentials)


    Hello,

    I am sure this is very simple but have not been able to do it just yet.
    I would like to load the post author user_login and attach it to the end of a url in a widget.

    I came up with this but it doesn’t work:

    
    <?php 
    $username = get_the_author_meta('user_login');
    ?>
    <a href="https://www.MYLINK.com/R1-<?php echo $username; ?>" target="_blank">MY LINK NAME</a>
    

    Thank you for your help!

    • This topic was modified 5 years, 4 months ago by Jan Dembowski.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display Username in URL’ is closed to new replies.