Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Help with new function


devweb
Participant

@devweb

Wow, thanks guys, got a bit lost in your convo though, so I have this (bear in mind my knowledge is a bit pants), I have used the bp-custom.php file as you suggested Jeff:

In the bp-custom.php file:

<?php

function get_user_name_display() {
global $wpdb;
$row = $wpdb->get_results( $wpdb->prepare("SELECT user_login FROM $wpdb->users WHERE u.ID = %d", $bp->displayed_user->id) );

print_r($row);

}

?>

Then in the member-loop.php file:

<?php global $bp; echo get_user_name_display( $bp->displayed_user->id ); ?>

This is currently outputting ‘array ( )’. I think I’m nearly there, just need a little shove …

Thanks again

Skip to toolbar