I don’t think you want the display name – it may not be unique.
Try using the log-in name instead.
The user name for the displayed profile:
$myhope = bp_get_displayed_user_username();
The user name for the current user:
$current_user = wp_get_current_user();
$myhope = $current_user->user_login;
Related Posts:
- Buddypress shortcode for tabs [closed]
- access shortcode atts in template part
- How to add stylesheets only to pages with specific shortcode?
- Hide/show content starting in the middle of a paragraph
- TED talks shortcode not working
- What is the best way to enable nested shortcodes?
- Organizing shortcodes. How to display all of them and their attributes?
- Can I strip HTML tags in the “Compare Revisions” screen?
- how do you get the author’s username?
- do_shortcode inside AJAX callback
- shortcode_unautop shortcode not functioning
- Shortcode perfomance solution
- Video embeds work in backend, but are not parsed in frontend
- How can I run shortcode after click with ajax
- Execute shortcode within shortcode
- How get a shortcode working in category description
- shortcode not working and the relation to the_content()
- display shortcodes outside of the_content
- How to prevent tinymce macro from inserting nbsp;?
- Pros and cons of actions over shortcodes
- How to enqueue script based on post category?
- Disable oEmbed for a Single Shortcode or at Least All Internal Links
- How to check if this is the nth instance of a given shortcode in a post
- conditional shortcode not working
- Extending Shortcode attributes
- Shortcode But Without The Equals Sign?
- Shortcode output is screwed up when arrow symbol “
- shortcodes between square and curly brackets
- Searching in shortcode contents
- Applying filters to the_content() to separate content if any `add_shortcode()` is found?
- Wp_localize_script from Shortcode [closed]
- Localization inside shortcode not working
- How to Get a part of URL and put in shortcode?
- Get shortcode attribute outside of WordPress
- Overriding shortcode $atts for featured products
- How to create a shortcode for embedding pdf in iframe?
- Woocommerce, ordering products by default on shortcode pages
- get_shortcode_regex() only matches first shortcode
- Looking for a way to include/embed text from a file on a page so that the short codes are processed
- Gravity forms customize field markup for the same form appearing in different places
- How can I hide the Permalink/Shortlink for certain user logged in Users of a certain level?
- How to force that styles are enqueued in the header?
- How To Conditionally Include A Short Code Depending On The HTTP_REFERER [closed]
- Create shortcode in WordPress, using one variable in 3 functions?
- Edit shortcode in post content programatically
- Adding javascript actions to words in post content
- How to change to local video player on shortcode ultimate to video.js?
- My shortcode does not call the function
- Shortcode not showing anything
- return unformatted content in encosing shortcode
- How to display Feedburner subscription count as plain text via a shortcode in post/page editor of my WordPress blog?
- How to create an incremental list using shortcodes?
- Shortcode in my childtheme is not working
- Do shortcode that is inserted in a textarea is not displaying properly
- How to Make Archive ShortCode
- Are Shortcode Attributes Always Passed As Strings?
- Show form per shortcode
- wp_editor not rendering the shortcode
- Default WordPress shortcodes not working?
- How to make this shortcode work for post content wordpress [duplicate]
- Pass fileurl parameter into shortcode from Advanced Custom Fields
- stop WordPress removing shortcode from content [closed]
- caption shortcode using image alt as caption
- Shortcode arguments to another shortcode
- Sanitize or treatment of string in editor via shortcode
- Is it possible to handle two or more shortcodes in a single page?
- Toggle Shortcode Sanitize Title
- Use full size images in a specific gallery
- How to deal with WordPress bug: can’t use wrapped and unwrapped shortcode on same post
- Execute Shortcodes when submitting post
- Substituting value via shortcode
- Create shortcode for each form field in contact form 7
- Can’t render shortcode when html tag contains hyphen
- Auto embeds don’t work for attachment descriptions
- Shortcode to appear and show the date not code in Title and description of Social Media sites
- Not to escape a text
- how to add shortcode widget at end of main blog page
- Shortcode result appears above page content
- Pagination for custom posts loop
- Shortcode is not showing content when placed in editor (post_type = page)
- Modify [caption] shortcode so and are not used?
- How to set up posts per page on WP
- How to insert a short code into Contact Form 7 in WordPress that will call a function once the submit button is pressed
- How to Call Related Post based on Categories Inside Post Content with Shortcode?
- Hide shortcodes content from the excerpt?
- WordPress Server Time not changing/displaying correctly
- Can we create a shorcode to move next page?
- launch a shortcode from a link
- how to add acf value to other plugins shortcode?
- Only execute specific shortcodes
- Trying to echo out custom field inside shortcode?
- Custom shortcode that writes to file
- how to show last 5 images from the one post gallery
- Add JavaScript in footer if shortcode used in page [duplicate]
- Is there a way I can return terms by name using a shortcode?
- Shortcode Output Always Before Content [duplicate]
- How i make a shortcode from this code
- Shortcode Attributes – post__not_in array
- Create a shortcode to display the “the_content ()” in my post [closed]
- Shortcode return vs echo. Return messes with data URLs, echo does not