BuddyDev

Search

[Resolved] Private message button even for non logged in users

  • Participant
    Level: Enlightened
    Posts: 39
    Tiziano on #5022

    Hello Brajesh, I would like to show the private message button in the buddypress page profile even for non logged in users. When a non logged in user push on the button should be asked to login (or registrer). Do you think is possible?

    Thank you
    Tiziano

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #5036

    Hi Tiziano,
    Thank you for posting.

    Making the button visible is not an issue, you can filter on ‘bp_get_send_message_button_args’ and set ‘must_be_logged_in’ to false and the button will be visible.

    The problem is link will be empty. In order to handle it, you will need to create some sort of route and pass that to the ‘link_href’ in the same filter function.

    Hope that helps you.

    PS: yes, it is possible.

  • Participant
    Level: Enlightened
    Posts: 39
    Tiziano on #5050

    Thank you Brajesh,

    I’ll try and let you know…
    Tiziano

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #5057

    You are most welcome. I am looking forward to it.

  • Participant
    Level: Enlightened
    Posts: 39
    Tiziano on #5060
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #5063

    Hi Tiziano,
    I have posted the code as a tutorial here

    https://buddydev.com/buddypress/buddypress-private-message-non-logged-users/

    Hope that helps.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 39
    Tiziano on #5066

    I have made a test on my website and it’s just PERFECT! Evething works fine. Thank you!

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #5067

    Thank you for confirming.
    You are most welcome 🙂

The topic ‘ [Resolved] Private message button even for non logged in users’ is closed to new replies.

This topic is: resolved