Support Forum
This one's a "would be nice to" but understand if it's not possible.
In an effort to enhance the forum for our students I was wondering if we can replace columns on the Member page, specifically "Registered" and "Last Visited":
I'd like to have "Location" as well as a custom profile field I created included instead. Would that be possible?
the members page is controlled by page template like any other page view... you can adjust the page as you like by editing the members page template in the sp theme you are using... as always we suggest a child theme or a custom theme before editing it...
by adding display functions, or just simply grabbing wp/sp data and outputting, you can custom what is shown...
Visit Cruise Talk Central and Mr Papa's World
I've read the through the codex again, which is a great resource for WP programmers, but alas I am not a WP programmer (my forte is data science, R, Python etc.), I can't spend a lot of time trying to read myself into it all for a minor change.
I tried adding sp_ProfileShowLocation('', __sp('Location')); to spMembersView.php (custom theme), but it shows up blank. Same for adding sp_CustomProfileFieldsDisplay('Blog Category', $spProfileUser->ID);.
well, you cant use a profile show type function because those are designed for profile view, so the $spProfileUser user object wont be set up... the user object that will exist here is $spThisMember...
and then get the data via $spThisMember->location I believe... I think that will exist for your first example...
and then the second, use spThisMember->ID...
Visit Cruise Talk Central and Mr Papa's World
Got it, thank you so much. I have the custom profile field displaying now and properly formatted.
However, when I do echo $spThisMember->location; it comes up blank. Other options work fine, i.e. echo $spThisMember->lastvisit; displays the last visit date for each member. Attaching screenshots again:
are you sure they have a location defined in their profile?
if so, its possible the user object for members view is not a full user object... but you can always fill it with the data... before using, try adding this:
$spProfileUser->location = get_user_meta($spProfileUser->ID, 'location', true);
then you should have it available...
Visit Cruise Talk Central and Mr Papa's World
you can optimize that a bit to be:
echo get_user_meta($spThisMember->ID, 'location', true);
Visit Cruise Talk Central and Mr Papa's World