Please or Register to create posts and topics.

Social share integration

Please how can i share a particular forum post with social media buttons? This will help in my traffic generation to the forum.

Hello mitchey,

there are some post-related hooks available which allow you to add your own functionality to the forum. The asgarosforum_after_post_message hook could be a good place to start.

mohi6644 has reacted to this post.
mohi6644
If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Thanks for the response, Asgaros. But please how do I get started with the asgarosforum_after_post_message hook?

Hi mitchey

Only as a project, I did not check:

add_action('asgarosforum_after_post_message', 'my_function_share', 10, 2);
function my_function_share($author_id, $post_id) {

echo 'Your code';	
}

 

Thanks Yworld. While particular file do I try out this code in? Is it forum.php?

Quote from mitchey on May 6, 2017, 8:32 pm

Thanks Yworld. While particular file do I try out this code in? Is it forum.php?

To do this you just have to add this code to your themes functions.php file

Or should be used in code $author_posts, I do not know what code you will insert and what will happen

 

Alright. Thank you. But have you ever considered the option of including “like” and “share” buttons to your own forum?

Quote from mitchey on May 6, 2017, 9:34 pm

Alright. Thank you. But have you ever considered the option of including “like” and “share” buttons to your own forum?

I did integration with plugin Wp-Recall https://asgarosforum.ru/forum/?view=thread&id=96

There is something for your plugin Ultimate Member. I did not do it, but I have it in the collection  https://asgarosforum.ru/forum/?view=thread&id=96

 

 

Thanks a lot.