get_ad_placement() rather than the_ad_placement()?
-
I am trying to insert ad placements into my theme’s loop.
I want to be able to dynamically iterate through ad placements using a counter.I’d have 5 ad placements with an id of 1-5. I have a counter on my loop that counts up, starting at 1. My function automatically fills in the ad placement’s id and displays it on the page in its proper position.
I want to be able to wrap the ad placement code in a container that I can control via a function. The problem is, the only ad placement function available is the_ad_placement, which echoes the ad rather than just making the ad code available to me. I can’t wrap that in more html code.
If I had a function like GET_ad_placement(), then I could alter the html before echoing to the page.
The manual says that, “Placements are automatically wrapped in a container with a random id and a class…” However, they are not. The only code echoed to the page is the code I placed in the rich text editor for an image ad. I need to be able to wrap the ad so I can style it.
Any help with this?
Thanks!
- The topic ‘get_ad_placement() rather than the_ad_placement()?’ is closed to new replies.