Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • bennypowers
    Participant

    @bennypowers

    Here’s my broken snippet. I think I’m not grokking something about apply_filters()

    <?php
    
    $button = array(
      'wrapper_class' => '',
      'link_class' => 'read-more-button'
    );
    
    apply_filters( 'bp_get_blogs_visit_blog_button', $button );
    

    bennypowers
    Participant

    @bennypowers

    Success! I needed to use bp_get_blog_id() instead of bp_blog_id()


    bennypowers
    Participant

    @bennypowers

    tried this, but it just prints the user id to page

    
    
    add_action( 'bp_directory_blogs_item', 'display_user_xprofile' );
    function display_user_xprofile() {
        $args = array(
            'user_id' => get_user_id_from_string( get_blog_option(bp_blog_id(), 'admin_email') ),
            'field'   => 'Phone', // Field name or ID.
            // 'field'   => 'Car', // Field name or ID.
            // 'field'   => 'Languages', // Field name or ID.
            );
        $phone_number = bp_get_profile_field_data( $args );
    
        if ($phone_number) {
            echo 'Phone Number: ' . $phone_number;
            // echo 'Car?: ' . $phone_number;
            // echo 'Languages: ' . $phone_number;
        }
    
    }
Viewing 3 replies - 1 through 3 (of 3 total)
Skip to toolbar