This topic has 13 replies, 4 voices, and was last updated 8 years by Andrei.

  • Author
  • #49397
     Salle32
    Participant

    Hi,

    I spent a couple of hours trying to figure out how to add share-links (social_share) to all topics and replies in the forums. I´m not even close….

    Could you please advise exact how I do it?

    Many Thanks

    Fredrik

    #49538
     Radu
    Moderator

    Hello,

    Add this code to your functions.php from kleo-child directory

    COPY CODE
    
    
    add_action( 'bbp_theme_after_reply_content', 'kleo_social_share' );
    
    

    Let me know if it works.

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #56170
     Salle32
    Participant

    Hi,

    I answered to a no-reply e-mail adress 🙂

    The answer is : still doesn´t work as expected.

    Please advise!

    Fredrik

    #57559
     Salle32
    Participant

    Hi!

    Any ideas?

    Best Regards
    Fredrik

    #57659
     Andrei
    Moderator

    Hi @salle32, can you please be a little bit more specific and explain in what way it doesn’t work as you expected.
    Looking forward to help you.
    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #57686
     Salle32
    Participant

    Hi!

    Now I have a pic of what I mean!
    Please look at it and say if it´s possible.

    Best Regards
    Fredrik

    Attachments:
    You must be logged in to view attached files.
    #57752
     Andrei
    Moderator

    Hi mate, please note that in your first request you’ve said you want them in forums and topics.
    The image you’ve put up in your last post is from buddypress activity stream.

    Here is a code which you should add it to your functions.php file and will add share buttons for each activity entry:
    http://pastebin.com/CiNX5XPk

    Let me know if I can help you with anything else.
    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #57970
     Salle32
    Participant

    Thank you!

    Works like charm!!

    Sorry for defining wrong need in the beggining!

    //Fredrik

    Attachments:
    You must be logged in to view attached files.
    #81841
     tubbytat
    Participant

    when i added the code from http://pastebin.com/CiNX5XPk and uploaded it to the kleo child functions.php i got a white screen on my site. Any reasons for this?

    #81853
     Andrei
    Moderator

    Probably you’re not correctly applying the given code snippet.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #81862
     tubbytat
    Participant

    well i copied and pasted the code from http://pastebin.com/CiNX5XPk into the kleo child functons.php, saved and uploaded back to the same folder, refreshed my theme and got white screen.

    so then i added add_action( ‘bbp_theme_after_reply_content’, ‘kleo_social_share’ ); to the functions.php and that gave me the add share links below the forum posts

    #81964
     Andrei
    Moderator

    Can you please zip the functions.php file and attach it here so I can review it and send it back to you ?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #81997
     tubbytat
    Participant

    thanks, see attached

    Attachments:
    You must be logged in to view attached files.
    #84234
     Andrei
    Moderator

    On line 13 you have an extra ‘ Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

Viewing 14 posts - 1 through 14 (of 14 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?