Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)

  • KS Web Designer
    Participant

    @ks-webdesignercom

    Perfect, that did the trick. For anyone else following this be sure to add the semi-colon after return $thread_template->message->date_sent so the snippet reads:

    function absolute_message_sent_date() {
        global $thread_template;
        return $thread_template->message->date_sent;
    }

    Just one quick follow-up question. How do I change the date format? Where do I specify how the date should appear?

    Thanks again!


    KS Web Designer
    Participant

    @ks-webdesignercom

    Thanks again, just needed one slight tweak. Final code is as follows:

    <?php echo 'Hi ' . bp_core_get_username( bp_loggedin_user_id() ) . ' – Account Type: ' . xprofile_get_field_data( 'FIELD NAME OR ID', bp_loggedin_user_id() ); ?>

    Didn’t need the “field=” for xprofile… Works using either the field name or the id.


    KS Web Designer
    Participant

    @ks-webdesignercom

    Thanks, it kinda works. Only if I’m viewing my profile page. If I view any other page on the site it doesn’t find the value and just displays: Account:

    I am trying to run this in the header.php file of my template…


    KS Web Designer
    Participant

    @ks-webdesignercom

    Spot on! Thanks @shanebp


    KS Web Designer
    Participant

    @ks-webdesignercom

    Thanks that’s very helpful.

    However I also need to make some code changes in the same general area, so if someone can help me locate the right place to be making those changes I would also appreciate it.

    Thanks


    KS Web Designer
    Participant

    @ks-webdesignercom

    So I’m trying to figure this out on my own and I got as far as finding out that since BuddyPress 1.7 there’s a new class: BP_User_Query – which should be similar to the standard wordpress WP_User_Query

    However the official BuddyPress documentation page for the class is just a holding page (argh!) – https://codex.buddypress.org/developer/class-reference/bp_user_query/

    Does anyone have a basic ‘Hello World’ example they could give me for pulling in a list of users based on a custom profile field?

    I’d really appreciate it.
    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
Skip to toolbar