How to make sure the inline-ads doesn't appear right after the H2/H3 or images

Posted in: Newspaper
Post count: 16

Hi,

I added inline-ads and it showed as expected. But the issue is I don’t want it to show right after H2/H3 tags, and the images.
I did look into your code, and seeing that the expected result should be:
<p>content</p> ~ad~ <p>content</p>
But my case:
<p>content</p><h2>content</h2> ~ad~ <p>content</p>
<p>content</p><img /> ~ad~ <p>content</p>

Is there anyway for me to override the render result? Then I can check and move the position of the inline-ads if it violated the rule?
My site: https://www.kbb.com/best-cars/best-used-muscle-cars-under-50000/

I’m the technical guy, so please go ahead with technical solution.

Thanks

Post count: 21065

Hello!

I can’t access your website: https://prnt.sc/55wZuB8KjMUl
The H2 should be a title inserted in the Gutenberg or Classic Editor.

Thank you!

Post count: 16

Hi,
How if you copy the url and enter into your browser? https://www.kbb.com/best-cars/best-used-muscle-cars-under-50000/

The H2 should be a title inserted in the Gutenberg or Classic Editor.
=> I’m not sure how the Content team create the posts’ content. What I want is the ability to override the inline-ads position if it violate our Marketing rules.

Thanks

Post count: 21065

Hello!

That appealed to me, but I am unable to access the website using any browser, including Firefox or Chrome.
If you add an inline ad to a paragraph, then it should be in a different div : https://prnt.sc/QW0WFpl1EZlD
If you delete the title from that post, you can see there is no more h2.
For customization and other services you can contact our custom work team here: https://tagdiv.com/premium-customization-services/

Thank you so much for understanding!

Post count: 16

Hi,

My issue is I don’t want the inline-ads appear right after the image, or H2 tag.
https://prnt.sc/iO0EtsAIEXik
I can not change or remove the H2 tag, because it’s the content from difference team.
My question is: is it possible for me to override the render of inline-ads by my side? And if yes, please tell me how to do it.

Thanks

Post count: 21065

Hello!

A workaround could be to include it in a paragraph, above or below the content, or to change the ad position in the element settings: https://prnt.sc/SZ-B8HPCQj1S

Thank you!

Post count: 16

Hi,

Our scenarios are:
– There are hundred thousand of articles, each article has its own content/image. Then I afraid the setting with paragraph position can’t cover for all cases.
– The marketing team doesn’t want the inline-ads appear at the beginning, OR at the end of the content. They want the inline-ads appear somewhere at the middle of the article. But NOT right after the image OR H2/H3 tag.
– I did try to add a filter to hook to ‘the_content’ to capture and edit the rendered content, but even the priority to hook is 99999, the content I got doesn’t contain the inline-ads yet.
– We don’t want to add custom code to your tdb_state_single class in td-cloud-library plugin.

=> That’s why I’m asking if you can guide me how to overwrite the ads rendering from our own plugin. Or how can I catch the content which including the inline-ads in there? Then I can process the content string to move the position of the ads as I need.

Thanks.

Post count: 21065

Hello!

You can create a duplicate template, change the value of the paragraph for the different case, and assign it to those posts.
If you do not want to modify the files, then you can modify it in a child theme: https://forum.tagdiv.com/the-child-theme-support-tutorial/
The code requires custom work, which is not covered by the support team.

Thank you for understanding!

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.