Skip to:
Content
Pages
Categories
Search
Top
Bottom

Custom member page button code

  • I’m making some custom buttons for my member pages using bp_send_private_message_button() as my template (see below). What I want the buttons to do is link to the page specified in the link_href field. I need that link to go to the archives page of whatever user’s profile was being viewed when the link was clicked. This is for a “view user’s posts” button on each member’s page.

    What would the syntax be for that particular link in the link_href field below? I’ve tried a few things but not having much success.

    Code:

    `/**
    * bp_send_private_message_button2()
    *
    * Copy of original bp_send_private_message_button()
    *
    * @uses bp_get_send_message_button2()
    * @since 1.2.6
    */
    function bp_send_private_message_button2() {
    echo bp_get_send_message_button2();
    }

    function bp_send_message_button2() {
    echo bp_get_send_message_button2();
    }
    function bp_get_send_message_button2() {
    return apply_filters( ‘bp_get_send_message_button2’,
    bp_get_button( array(
    ‘id’ => ‘private_message2’,
    ‘component’ => ‘messages2’,
    ‘must_be_logged_in’ => true,
    ‘block_self’ => true,
    ‘wrapper_id’ => ‘send-private-message2’,
    ‘link_href’ => LINK GOES HERE,
    ‘link_class’ => ‘send-message’,
    ‘link_title’ => __( ‘Send a private message to this user.’, ‘buddypress’ ),
    ‘link_text’ => __( ‘Post New Ad’, ‘buddypress’ )
    ) )
    );
    }`

  • The topic ‘Custom member page button code’ is closed to new replies.
Skip to toolbar