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
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.
Sign up to join this communityI 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
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>