Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1143612
    rick_156
    Participant

    I’m working on a member site in X Theme using the Renew stack. I need to add a dynamic “Welcome Username” item into the topbar, but I also have several other links in the topbar as well. (See Screenshot)

    I need to insert the following PHP code into the topbar:

    <?php $user_info = get_userdata(1);
    echo ‘WELCOME ‘ . $user_info->first_name . “\n”;
    ?>

    I have a child theme setup. I just need to know where to place this code and in what file. I also need to know how to make it play well with the other items I already have functioning in the topbar.

    Thanks!

    #1143840
    Jade
    Moderator

    Hi there,

    You can place the code in the _topbar.php file which you can find in /wp-content/themes/x/framework/views/global/

    Hope this helps.

    #1145317
    rick_156
    Participant

    Thank you Jade. I got it working!

    #1145845
    Rue Nel
    Moderator

    You’re welcome!
    We’re glad we were able to help you out.

  • <script> jQuery(function($){ $("#no-reply-1143612 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>