Hi,
Yes, that would be possible.
The second parameter in this filter is the Advanced_Ads_Ad
class, which can call the options()
method which returns an array. If available and inside a placement, the key placement_type contains the type of the placement.
As a starting point, you might test something like:
$options = $ad->options(); if (isset($options['placement_type']) && $options['placement_type'] === 'post_top') {
Please keep in mind that we provide the code snippets and content on this page without any guarantee or support.
In most cases, these pages are created on requests or based on individual solutions sent to us by other users. After it was published, we are only reviewing the code and content when we are made aware of an issue. Please only use the codes if you understand them and know how to add custom code to your WordPress site.
Best regards,
Joachim