the_ID = 0
I am contributing to Advanced Ads, an ad management plugin, and we recently had a customer who wanted to inject an ad only into the group page. We already did have a solution implemented for displaying ads only on certain pages, however, it did not work for BuddyPress generated pages. When we had a closer look at it, we realized that it did not work simply because of the fact that the id of the page got altered to 0 when BuddyPress was using it.
When a page is loaded, we check if there are any ads that should be displayed by comparing the current pages ID to the IDs of the content specified by the display conditions the user has set. This does not work for the reason mentioned above.
Is there a workaround for this issue and if there is none, what is the reason for this behavior?
BuddyPress: 2.6.2, 2.7-beta1
- You must be logged in to reply to this topic.