Ads on Inpirebook Member profile page

Hi there,

I was wondering if you have a way of adding some adsense code to the profile page, we have been able to add ads to sidebar and the top of stand alone pages, but it would be great if we could ad some ads just below the de activity, profile link on each members page and right above the sub links or user posts.

we tried to figure it out but truly not coders and we ran out of talent lol

Thank you,


Hello WilliePlas,

Add following code in your child themes functions.php

function custom_codes() { ?>
    <!--You can simply paste your codes here-->
    <div class="clearfix">Test</div><?php

add_action('bp_before_member_body', 'custom_codes');

Hope this helps you.


OMG THANK YOU SOOOO much Sagarjadhav!!!

This worked, i really appreciate it buddy.

I was wondering if i could take a bit more of your time and ask if we could do the same code insert on the site wide activity, member page, and groups page feeds? I would assume its the same right? only changing the ‘bp_before_menber_body’, but what would i change it to?

Thank you again and I am sure this post will help many other people.

Kind regards,


Hi WilliePlas,

Glad to know it helps you :slight_smile:

Following actions you can use as per your requirement.

add_action( 'bp_before_directory_activity_list', 'custom_codes' );
add_action( 'bp_before_members_loop', 'custom_codes' );
add_action( 'bp_before_groups_loop', 'custom_codes' );