• I need help in disabling infolinks ads on specific page on my website, I need to disable ads on terms and conditions, privacy, affiliate and contact us page. I contacted infolinks but they told me to contact WordPress for this, I tried advanced ads and few other plugins but it did not work.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • You could try something along this line, where the array is made up of the page ID numbers you want the specific thing to be hidden on.

    if is_page(array(365, 363, 371, 369)) {
         /* hide infolinks ads here */
    }

    Likewise, I see you are including the javascript to Infolinks in your footer. You could apply the above the same way, like this:

    <?php if is_page(array(365, 363, 371, 369)) { /* do nothing */ } else { ?>
      <script type="text/javascript">
        var infolinks_pid = 3180351;
        var infolinks_wsid = 0;
      </script>
      <script type="text/javascript" src="//resources.infolinks.com/js/infolinks_main.js"> 
      </script>
    <? } ?>

    In theory, that should remove the javascript from any pages in the ID array and only print it on the ones that aren’t that page ID.

    I can’t actively test this, so I’m pretty much just going off the top of my head, but hopefully this will at least point you in the right direction.

    Thread Starter aarohan1

    (@aarohan1)

    Thank you so much!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Need help to disablle Ads’ is closed to new replies.