Hello I am using the below script to display my advertisement
<a href="<?php the_permalink() ?>" onclick="func()" title="<?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a>
i am using onclick to display my advertisement
<script>
function func()
{
window.open("xxxxx.html", '_blank');
return false;
}
this is my function
xxxxx.html is
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- xxxxxxxxxxxx -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-xxxxxxxxxxxxx"
data-ad-slot="xxxxxxxxxxxxx"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
It is only opening the advertisement window but i want to open the link used in xxxxx.html (i.e) script i denoted above