Hello,
I’m not sure whether I understand your problem correctly.
How have you used the shortcode?
How have you implemented PHP function call or custom hook?
Please enable remote debugging:
https://wordpress.org/support/topic/ad-inserter-support-how-to-ask-for-help/
In the space next to the logo you have the following code:
<div class="header-ad">
<!--MONUMETRIC [ATF|Pos 1] D:728x90 T:728x90 M:320x50,320x100 START-->
<div id="mmt-89db5b0f-7437-45eb-a506-b9a9d42365d8"></div>
<script type="text/javascript" data-cfasync="false">$MMT = window.$MMT || {}; $MMT.cmd = $MMT.cmd || [];$MMT.cmd.push(function(){ $MMT.display.slots.push(["89db5b0f-7437-45eb-a506-b9a9d42365d8"]); })</script>
<!--MONUMETRIC [ATF|Pos 1] D:728x90 T:728x90 M:320x50,320x100 ENDS-->
</div>
However, this code doesn’t show anything.
You have a lot of javascript errors on that page:

Hi Igor,
Thanks for your help! I really appreciate. Sorry if I did not manage to properly explain my problem, it was indeed a bit blurry.
Basically, I want to make the space next to the logo, visible/accessible by Ad Inserter, and use this space for Ad Inserter ads.
#1. How have you used the shortcode?
I tried both [adinserter name=”myAd”] and [adinserter block=”7″]
#2. How have you implemented PHP function call
I used <?php if (function_exists ('adinserter')) echo adinserter (7); ?>
#3. or custom hook?
I went to “Ad Inserter settings” > tab “Hook” > and used “header-ad” hook in “action”.
The code in the space next to the logo, should be replaced by one of your shortcode, PHP function call or hook, once I will have been able to implement any of those solution.
Once again, I really appreciate your help.
-
This reply was modified 8 years, 5 months ago by
nikkoboy.
Are you sure header-ad hook exists in your theme?
If not you can make it there.
You need to modify your theme file (very likely header.php, I suggest to create a child theme and not to modify the original theme files) with something like this:
<div class="header-ad">
<?php do_action ('header-ad') ?>
</div>
Then you configure it in Ad Inserter and use it as position for automatic insertion.
Hi Igor,
Thanks for your input! I had a look into the header.php file of my theme, and found a snippet which looks closely like the one your provided:
<?php if (wt_get_option( 'wt_header_ad' )) {?>
<div class="header-ad">
<?php echo wt_get_option( 'wt_header_ad' ); ?>
</div>
<?php } ?>
Since they almost look like the same, I’m not sure if this would change anything. I’ll give it a go to see if that changes anything (but it will likely deactivate the ad space from the theme’s settings).
FYI, I also tried and added wt_header_ad to the hook settings in Ad Inserter, but it didn’t work.
Cheers,
But there is no such hook as wt_header_ad in your file?!
In my post above you have the code for the hook if you wish to implement it.
Hi Igor,
I replaced
<?php if (wt_get_option( 'wt_header_ad' )) {?>
<div class="header-ad">
<?php echo wt_get_option( 'wt_header_ad' ); ?>
</div>
<?php } ?>
By your code
<div class="header-ad">
<?php do_action ('header-ad'); ?>
</div>
And it worked! The ad space is now available in Ad Inserter.
I think the issue was that the hook does work with do_action and not with wt_get_option.
Thanks again for your assistance!
-
This reply was modified 8 years, 5 months ago by
nikkoboy.
I think the issue was that the hook does work with do_action and not with wt_get_option.
Of course!
Thanks again for your assistance!
Please say it here:
https://wordpress.org/support/plugin/ad-inserter/reviews/
Thanks Igor! I’m rating your plugin 5 stars!! Awesome assistance, and fantastic plugin!!