There is no Ad Inserter menu at the top of my posts. “Debugging functions in Admin menu” IS, however, enabled:
View post on imgur.com
You only need to check Remote debugging.
Ok, remote debugging is enabled.
On that page code block 3 is inserted but it is empty.
On other pages this code block inserts some quotes.
What code is configured for this code block?
I assume that’s this one? (see screenshot) https://imgur.com/a/CyQyN
The configuration hasn’t changed, but for some reason the block is now showing up and breaking the text flow since last updates.
Hi, any insights from that code block configuration? Thanks.
Well, you have some PHP code.
You need to debug it to see what it outputs.
Ad inserter only inserts your code (which is generated by this PHP code).
I’m not sure what you mean. What are you telling me to do?
This code has been there unchanged for over a year and only recently started adding the extra blocks.
Let me know specifically what steps to take, thanks.
Remote debugging is enabled! That’s what you asked me to do first, which is what I’m responding to. Why is it inserting three code blocks instead of one, even when empty?
Block 1 is inserted and visible.
Block 2 is also inserted but hidden on desktop (configured for mobile devices).
Block 3 is inserted but your PHP code doesn’t generate anything, however, there are also spaces. To prevent insertion delete all characters before and after PHP code.
If the code block is empty (no characters) it should not be inserted.
If you can’t solve the issue you can open a ticket and refer to this thread.
Ok! Thanks for looking at that.
As you can see, the Block 1 is breaking the text flow. It appears it’s because it’s now inserting a clear:both;
<div class=”code-block code-block-3″ style=”margin: 8px 0; clear: both;”>
</div>
The clear is NOT in the code I inserted; did you add this in an update? Code:
<?php if(get_field(‘article_pullquote’) != “”) { ?>
<div class=”pullquote-area”>
<div class=”article-pullquote”><?php the_field(‘article_pullquote’); ?></div> </div>
<?php } ?>
So, how do I get rid of the inline inserted clear:both; that is breaking text flow and is not in my code? Thanks!
Ok, I figured it out! Edit “Alignment and Style” and remove the clear:both; – must be new. Possibly worth adding to instructions. Ok, thanks!
As to why the Ad Inserter menu does not appear at the top of my posts (with the debugger), should I open a separate thread for that?
OK, now I understand the problem.
The solution is simple. Set Alignment and style to No wrapping.
Then only your code will be inserted (no wrapping div).
Of course you can also use custom CSS without clear: both;
.
For example: margin: 8px 0;