The Custom Code option that comes with Advanced Ads Pro allows you to deliver additional codes with your ads. While initially meant to deliver tracking codes, it can be used to display something as well. The option is delivered after the ad content by default. You can use the code below to a) deliver the custom code above the ad code as well and b) disable the output below the ad code.

Use the following code in your functions.php or a custom plugin.

add_action( 'advanced-ads-output-final', 'my_advanced_ads_pro_custom_code_above_ad', 10, 2 );
function my_advanced_ads_pro_custom_code_above_ad( $output, $ad ){
return $ad->output["custom-code"] . $output;

When using your custom code above the ad then you might want to prevent the default output below it. To do that, also add the following code to your functions.php

add_filter( 'advanced_ads_pro_output_custom_code', 'my_advanced_ads_pro_custom_code_prevent_default_output', 10, 2 );
function my_advanced_ads_pro_custom_code_prevent_default_output( $custom_code, $ad ){
return '';

You can also use the code above to manipulate the Custom Code output dynamically, e.g., based on the individual ad.