Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a topnav menu item that current says "My Account", I would like to change it so that it functions as:

Welcome [Logged in Username] -> My Account -> Logout

share|improve this question
    
What menu? What creates the menu? –  s_ha_dum Nov 25 '13 at 1:09
    
The menu was created by appearance>menu –  user43104 Nov 25 '13 at 1:31
    
The theme is largely responsible for how those menus work. What theme are you using? –  s_ha_dum Nov 25 '13 at 1:32

1 Answer 1

you can do it with jQuery, but you'll need to find that menu item's class or ID.

Here's an example:

<?php
global $display_name
get_currentuserinfo();
?>
<script>
jQuery(document).ready(function($) {
$('.your-class a').text('<?php echo $display_name;?>');
});
</script>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.