Hello,
you need to enable (client-side insert) device detection and then enable only wanted devices:
https://adinserter.pro/documentation/device-detection
You can use debugging function Label blocks to see which block is inserted and where:
https://adinserter.pro/documentation/device-detection
Can you please calrify which block (number) you are referring to?
Thread Starter
Влад
(@novichok78)
3. as a widget on the sidebar
Could not reproduce any issue.
Block 3 is not shown for tablet and phone devices – as configured.
БЛОК ВСТАВЛЕНО, НО НЕ ВИДИМО
What you see is not block 3 but the widget padding around a hidden block generated by the theme.
Need to check how this can be hidden.
Thread Starter
Влад
(@novichok78)
the block is displayed as an empty white block
Скриншот https://dropmefiles.com/Mw8mH
Thread Starter
Влад
(@novichok78)
another widget is not displayed with the same settings
As explained the block is not displayed – it is hidden.
You can check the page source code to see what is there – this is widget padding around empty widget – the block is inserted but hidden for mobile devices.
You can also use debugging function Label blocks to see where the blocks are:
https://adinserter.pro/documentation/debugging
Since you are using client-side device detection the widget is always inserted as the device is not known when the page is created.
Try to insert an empty block (only for mobile devices) inside HTML element #block-16 – Action Replace element to get rid of this padding:
https://adinserter.pro/documentation/insertion-before-inside-after-html-element
another widget is not displayed with the same settings
Can’t compare settings unless you list block number.
There is a difference.
Block 5 is inserted as a pure Ad Inserter widget and consequently when it is hidden the code tries to hide also the widget itself – and here it is hidden.
However, block 3 doesn’t seem to be inserted as a pure Ad Inserter widget – there is some dynamically added code around the block which prevents the widget form being hidden:
<div id="block-16" class="sidebar-box widget_block clr">
<div class="wp-block-group">
<div class="wp-block-group__inner-container">
<div class="wp-block-columns">
<div class="wp-block-column" style="flex-basis: 100%; position: sticky; top: 7243.23px;">
<div class="widget ai_widget ai-viewport-1 ai-sticky-widget" style="">
AD INSERTER BLOCK 3 CODE
</div>
</div>
</div>
</div>
</div>
</div>
It seems that you are using some plugin for sticky widgets that adds this extra widget code.
Maybe CSS mode for Ad Inserter sticky widgets may work with your theme:
https://adinserter.pro/documentation/manual-insertion#widgets
In any case you can try to use the approach described in the post above (you may need to add some insertion delay e.g. 100 ms or wait for the element #block-16).