Skip to:
Content
Pages
Categories
Search
Top
Bottom

Display Username on Messages page


  • jcfromkc
    Participant

    @jcfromkc

    function bp_message_thread_from() {
    	echo bp_get_message_thread_from();
    }
    	/**
    	 * Get a link to the page of the current thread's last author.
    	 *
    	 * @return string
    	 */
    	function bp_get_message_thread_from() {
    		global $messages_template;
    
    		/**
    		 * Filters the link to the page of the current thread's last author.
    		 *
    		 * @since 1.0.0
    		 *
    		 * @param string $value Link to the page of the current thread's last author.
    		 */
    		return apply_filters( 'bp_get_message_thread_from', bp_core_get_userlink( $messages_template->thread->last_sender_id ) );
    	}

    The code above is used to display the users full name on the Messages page.

    Does anyone know how to modify this code to display the username instead of the full name?

    I’d like to display both the full name and @username next to every message.

    Thx

  • You must be logged in to reply to this topic.
Skip to toolbar