If you have ever tried building a community website using WordPress, you probably already know BuddyPress. It is a WordPress plugin consisting of multiple components (e.g. groups, private messages, activity streams etc.), which allow you to build your own social network.
Inserting ads on BuddyPress pages is difficult because most of them are created dynamically. Automatic injections that work well for normal static pages and posts are not working as expected on all BuddyPress related pages. Therefore, Advanced Ads Pro has placements dedicated exclusively to placing ads on BuddyPress pages.
Table of Contents
How to display an ad on a BuddyPress page?
The placement dedicated to displaying ads on BuddyPress pages is the “BuddyPress Content” placement and you can find it in the list of placement types on the placement page.
In order to set up an ad to display using the “BuddyPress Content” placement, you only need to select one of the multiple hooks from the “position” drop-down menu.
Hooks listed under “Activity Entry” will display the ad in one of the multiple positions in the BuddyPress activity streams on the pages “/activity”, “/members/username/” and “groups/group name”.
Hooks listed under “Groups List” and “Member List” will display an ad on the “/groups” and “/members” pages respectively.
If you are unsatisfied with the positions provided by the hooks, you can also inject ads using the “Post Content” placement, however, this might take a basic understanding of your pages source code.
How to target ads to different BuddyPress profiles
Advanced Ads Pro will automatically add a new visitor condition if BuddyPress is enabled in your WordPress installation. After choosing this condition, you can select one of the created BuddyPress Profile Fields.
Then you can specify more precisely which profile data the ads should be targeted for. You can enter your own values and define if the profile field shall contain them, start/end with them, (does not) match them, and many other options.
Note: Please don’t forget to activate cache busting if you use this visitor condition on a website with an activated caching plugin.
Troubleshooting
In order to keep the list of placements as short as possible, the placement will only show up if the BuddyPress plugin is activated.
We are merely injecting the ads into the positions provided by BuddyPress, so ads will be cut when they exceed the width of the container they are injected in. Please be sure to choose the correct format for your ads.
This is due to the fact that pages like “/groups/name” or “/members/name” are only virtual pages created by BuddyPress and are technically handled as 404 error pages by WordPress. You can fix this issue by disabling the global option “Disable ads on 404 error pages” in the Advanced Ads plugin settings.