Skip to:
Content
Pages
Categories
Search
Top
Bottom

bp_core_get_userlink() and Twig file


  • feyrisa
    Participant

    @feyrisa

    Hi !

    I’m using a wp template based on twig file and I want to add a Private message button on post which are create by Buddypress user.

    I found this code “bp_core_get_userlink() ” but I don’t know how to write it in my twig file…

    I try that but it doesn’t work, someone can help me ?

    {% set url = bp_core_get_userlink()  %}
    <FORM ACTION="{{url}}">
    <INPUT TYPE="SUBMIT" VALUE="Envoyer un message au propriƩtaire"></FORM> 
Viewing 1 replies (of 1 total)

  • feyrisa
    Participant

    @feyrisa

    I fix it ! For who it concern ^^

    {% set id = post.post_author %}
    {% set author = wp.bp_core_get_username(id) %}
    <FORM ACTION="/members/{{author}}">
    <INPUT TYPE="SUBMIT" VALUE="Envoyer un message au propriƩtaire"></FORM> 
Viewing 1 replies (of 1 total)
  • The topic ‘bp_core_get_userlink() and Twig file’ is closed to new replies.
Skip to toolbar