- This topic has 3 replies, 2 voices, and was last updated 3 years, 3 months ago by
Fernando.
-
AuthorPosts
-
January 18, 2023 at 10:21 am #2500582
Taehyun
Hello, I have added taboola ads codes in my website “funnyissue.com”
I have put the code below in <head>
<script type="text/javascript"> window._taboola = window._taboola || []; _taboola.push({article:'auto'}); !function (e, f, u, i) { if (!document.getElementById(i)){ e.async = 1; e.src = u; e.id = i; f.parentNode.insertBefore(e, f); } }(document.createElement('script'), document.getElementsByTagName('script')[0], '//cdn.taboola.com/libtrc/mugtimes-funnyissuecom/loader.js', 'tb_loader_script'); if(window.performance && typeof window.performance.mark == 'function') {window.performance.mark('tbl_ic');} </script>and the code below in <body>
<script type="text/javascript"> window._taboola = window._taboola || []; _taboola.push({flush: true}); </script>And finally the code below in footer widget
<div id="taboola-alternating-thumbnails-a"></div> <script type="text/javascript"> window._taboola = window._taboola || []; _taboola.push({ mode: 'alternating-thumbnails-a', container: 'taboola-alternating-thumbnails-a', placement: 'Below Article Thumbnails ', target_type: 'mix' }); </script>However, the taboola ad, which is supposed to appear as infinite feed below articles or pages, don’t show up.
When checking my website in DevTools(F12), I can still see the code in the footer widget, but it is not appearing.I have applied the taboola ad code in one of my other website “mugtimes.com”, which is using newspaper theme, and it works fine.
I tried to solve this issue, but I can’t find out what the problem is.
Could you please help me out with this issue?Thanks.
January 18, 2023 at 5:38 pm #2500869Fernando Customer Support
Hi Taehyun,
Yes, we can try to help.
For reference, how are you specifically adding these codes at the moment?
January 18, 2023 at 8:07 pm #2500930Taehyun
I have added the codes in <head> and <body> by using ‘WPCode Lite’ plugin, which helps me to insert scripts to the header and footer.
And I have put
`<script type=”text/javascript”>
window._taboola = window._taboola || [];
_taboola.push({
mode: ‘alternating-thumbnails-a’,
container: ‘taboola-alternating-thumbnails-a’,
placement: ‘Below Article Thumbnails ‘,
target_type: ‘mix’
});
</script>’
code in the footer widget 1 by [Appearance] > [customize] > [Widgets] > [Footer Widget 1]January 18, 2023 at 8:45 pm #2500951Fernando Customer Support
I see.
Can you try using a Hook Element instead? Reference: https://docs.generatepress.com/article/hooks-element-overview/
For the head code, set the hook to
wp_head.For the body code, set the hook to
wp_body_open.For the footer code, set the hook to
wp_footer.You’ll need to have 3 Hook Elements for each code.
Let us know how it goes.
-
AuthorPosts
- You must be logged in to reply to this topic.