• Hey, Awesome Plugin with enormous potential….I wanted to populate the username and Subject field automatically .I wanted to add a send message button in post where username gets automatically populated with author and Subject field with Post title……I was able to populate author with this code in normal message system of buddypress but not able to do with the plugin activated `function bpfr_message_shortcode() {
    $author = get_the_author_meta(‘user_login’);
    $message = ‘<a href=”/login-2″>Login to Message advertiser!</a>’;

    if( is_user_logged_in() ) {
    return ‘<a href=” ‘.wp_nonce_url( bp_loggedin_user_domain() . bp_get_messages_slug() . ‘/compose/?r=’ . get_the_author_meta(‘user_login’) ) .’ title=”Private Message to Author” “>MESSAGE ADVERTISER</a>’;
    } else {
    return $message;
    }
    }
    add_shortcode( ‘ksam’, ‘bpfr_message_shortcode’ );`

    Any help pls ??

Viewing 1 replies (of 1 total)
  • Thread Starter hitesh23

    (@hitesh23)

    Hy, was able to populate Username with author name but do you know how can I populate subject field with. Post name ?.. .

Viewing 1 replies (of 1 total)
  • The topic ‘Populate Username and Subject’ is closed to new replies.