Skip to:
Content
Pages
Categories
Search
Top
Bottom

Code Stopped Working After Update


  • a3132
    Participant

    @a3132

    I had been using this code to show profile fields on a member’s card in the directory. It was working perfectly until the last BuddyPress update. After the update it disappeared. (even with all other plugins disabled and on the Twenty-Twenty theme)

    Is there a fix for this or should I change something in my code?

    function add_city_to_members_loop() {
    $field_content = bp_get_member_profile_data( ‘field=City’ );
    if( $field_content != false )
    echo ” – ” . $field_content;
    }
    add_action( ‘bp_directory_members_item’, ‘add_city_to_members_loop’ );

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

  • shanebp
    Moderator

    @shanebp

    Please use the code button when posting code.

    There is nothing wrong with your code.
    The BP 6.0 update did not change anything related to your code.
    Try calling a different profile field.


    a3132
    Participant

    @a3132

    Okay, I rolled back the BuddyPress version and then updated it again. Now everything works on Twenty-Twenty. I guess my first update got corrupted somehow. It’s still not showing on BuddyX but I guess that’s a theme issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar