Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • in reply to: Adding button to member masonry #168603
     Craftily
    Participant

    Hi Radu

    Anna at WC Vendors helped out with some code for this – here it is in case it’s useful for anyone else:

    COPY CODE
    /* visit store on kleo bp members page */
    add_action('bp_directory_members_actions', 'wcv_vendor_store_members_page');
    function wcv_vendor_store_members_page() {
    		$vendor_id 	= bp_get_member_user_id();
    		$shop_name 	= WCV_Vendors::is_vendor( $vendor_id );
    		$store_url  	= WCV_Vendors::get_vendor_shop_page( $vendor_id );
            $sold_by 	= '<div class="generic-button" id="post-mention"><a href="'.$store_url.'" class="send-message">Visit My Store</a></div>';
    		if (class_exists('WCV_Vendors') && class_exists('WCVendors_Pro') && WCV_Vendors::is_vendor( $vendor_id ) ) {
    		echo $sold_by;
    		}
                  
    }

    (raw gist in case hte above code doesn’t display properly)

    Here’s how it looks:

    Cheers

    in reply to: Adding button to member masonry #168136
     Craftily
    Participant

    Thanks, I’ll look into this. Nice way to change border colours on the avatars, I like that.

    The type is specified as ‘vendor’ and is currently used to pull in a button on the profile header as below. I just need to do this on the member block too, and maybe change the text ‘Private Message’ to just ‘Message’ or ‘PM’ to fit it in.

    Attachments:
    You must be logged in to view attached files.
Viewing 2 posts - 1 through 2 (of 2 total)

Log in with your credentials

Forgot your details?