Please or Register to create posts and topics.

I wish to add adsense within my forum

I have been looking for a possibility to add adsense within my forum and topics

Hello @hennkwah

You can use the available hooks to add custom-code to your forum. Some examples:

  • asgarosforum_after_first_post: Can be used to add custom code after the first post
  • asgarosforum_topic_custom_content_top: Can be used to add custom code to the upper-area of a topic
  • asgarosforum_forum_custom_content_top: Can be used to add custom code to the upper-area of a forum

You can read more about hooks here:

https://docs.presscustomizr.com/article/26-wordpress-actions-filters-and-hooks-a-guide-for-non-developers

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

please can you tell me how to add all the hook in the forum

hennkwah has reacted to this post.
hennkwah

Hello @hennkwah

For example you can add the following code to your themes functions.php file:

add_action('asgarosforum_after_first_post', 'ForumFirstPostAds');
function ForumFirstPostAds() {
  echo 'your code';
}

You still have to add your adsense-code there, but this information should be given to you by Google.

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

Hello again @hennkwah

Just for your info: The next big update will include an ads-manager. I plan to release it until the end of the year.

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

Hello – I’d also like to have adsense run on my forum and for it to work with Advanced Ads plugin.

Will the new release work with Advanced Ads and how close are you to the next release?

Thank you, Russell

Hello @bowraven

Depending on how the Advanced Ads plugin works you can directly paste the ad-code or shortcode inside the desired area in Forum -> Ads so they get displayed inside the forum.

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

Hey @asgaros 🖐
According the List of available hooks, seems like asgarosforum_after_first_post doesn’t work right now.
Anyway the below code doesn’t work neither:

aQuote from Asgaros on November 24, 2018, 3:30 pm
add_action('asgarosforum_after_first_post', 'ForumFirstPostAds');
function ForumFirstPostAds() {
  echo 'your code';
}

Hey @xpuct,

this hook was removed with the version 1.12.0 . I would advise you to use the docs on GitHub to check the available hooks:

https://github.com/Asgaros/asgaros-forum/blob/master/hooks.md

Please use the ‘asgarosforum_after_post’ action instead.

You can also easily add some adds with the built-in function of Asgaros Forum.

Asgaros has reacted to this post.
Asgaros
Need professional help with Asgaros Forum? Book an appointment with us at domra Web Solutions for setup and customization services. Learn more about our Toolbox for Asgaros Forum plugin to enhance your forum experience.

@qualmy91, thank you!